From 2350da51e5a9e476e5df9986a26823e19740ca52 Mon Sep 17 00:00:00 2001 From: Johnny Kuan Date: Thu, 22 Sep 2011 02:06:08 -0700 Subject: [PATCH] use git describe instead of rev-parse --- git-version.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/git-version.sh b/git-version.sh index 2744110..725f241 100755 --- a/git-version.sh +++ b/git-version.sh @@ -1,11 +1,9 @@ #!/usr/bin/env bash # add git revision to autojump -gitrevision=`git rev-parse HEAD` +gitrevision=`git describe` if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then gitrevision=$gitrevision"-dirty" fi sed -e "s/^AUTOJUMP_VERSION = \".*\"$/AUTOJUMP_VERSION = \"git revision $gitrevision\"/" autojump > autojump-version mv -f autojump-version autojump chmod a+rw autojump - -