diff --git a/git_hooks/post-checkout b/git_hooks/post-checkout index 050a3b675..8c3664d93 100755 --- a/git_hooks/post-checkout +++ b/git_hooks/post-checkout @@ -2,4 +2,4 @@ # # Writes git revision into git_revision file # -git show-ref refs/heads/master | cut -d " " -f 1 > git_revision +git rev-parse HEAD > git_revision diff --git a/git_hooks/post-commit b/git_hooks/post-commit index 050a3b675..8c3664d93 100755 --- a/git_hooks/post-commit +++ b/git_hooks/post-commit @@ -2,4 +2,4 @@ # # Writes git revision into git_revision file # -git show-ref refs/heads/master | cut -d " " -f 1 > git_revision +git rev-parse HEAD > git_revision diff --git a/git_hooks/post-merge b/git_hooks/post-merge index 050a3b675..8c3664d93 100755 --- a/git_hooks/post-merge +++ b/git_hooks/post-merge @@ -2,4 +2,4 @@ # # Writes git revision into git_revision file # -git show-ref refs/heads/master | cut -d " " -f 1 > git_revision +git rev-parse HEAD > git_revision diff --git a/scripts/getrevision.sh b/scripts/getrevision.sh index 0246c4638..eb341c9e6 100755 --- a/scripts/getrevision.sh +++ b/scripts/getrevision.sh @@ -3,7 +3,7 @@ REV="" if [ -e "/usr/bin/git" ] && ([ -e ".git" ] || [ -e "../.git" ]); then - REV=`git show-ref refs/heads/master | cut -d " " -f 1` + REV=`git rev-parse HEAD` elif [ -e "git_revision" ]; then REV=`cat git_revision` fi