File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1- #! /usr/bin/bash
1+ #! /usr/bin/env bash
22#
33# An example hook script to verify what is about to be committed.
44# Called by "git commit" with no arguments. The hook should
@@ -39,9 +39,15 @@ gitbranch=$(git branch --show-current)
3939# Get the latest tag commit
4040gitcom=$( git rev-list --tags --no-walk --max-count=1)
4141
42- # Count commits from the last tag to HEAD
43- gitcount=$( git rev-list master..HEAD --count)
44-
42+ # Count commits from the default base to HEAD (master → main → none)
43+ if git rev-parse --verify master > /dev/null 2>&1 ; then
44+ gitcount=$( git rev-list master..HEAD --count)
45+ elif git rev-parse --verify main > /dev/null 2>&1 ; then
46+ gitcount=$( git rev-list main..HEAD --count)
47+ else
48+ gitcount=$( git rev-list HEAD --count)
49+ fi
50+
4551# Extract the first part of the branch name
4652branchon=$( echo ${gitbranch} | awk -F' -' ' {print $1}' )
4753
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ private static function _versionCompare()
5353 public function __construct ()
5454 {
5555 self ::_versionCompare ();
56- define ('FOG_VERSION ' , '1.5.10. ' );
56+ define ('FOG_VERSION ' , '1.5.10.15788 ' );
5757 define ('FOG_SCHEMA ' , 273 );
5858 define ('FOG_BCACHE_VER ' , 141 );
5959 define ('FOG_CLIENT_VERSION ' , '0.13.0 ' );
You can’t perform that action at this time.
0 commit comments