@matheusbsbs / matheus-bagliano / commits / 1100ac81a9
Fork 0

Change GIT-VERSION-GEN to call git commands with "git" not "git-".

GIT-VERSION-GEN can incorrectly return a default version of "v1.3.GIT" because it tries to execute git commands using the "git-cmd" format that expects all git commands to be in the $PATH. Convert these to "git cmd" format so that a proper answer is returned even when the git commands have been moved out of the $PATH and into a $gitexecdir. Signed-off-by: Junio C Hamano <junkio@cox.net>

Sean committed May 22, 2006 at 00:39 UTC 1100ac81a90b03e0c037a286569a340decf7489b
1 file changed +2 -2
GIT-VERSION-GEN
+2 -2
@@ -5,7 +5,7 @@ DEF_VER=v1.3.GIT
5
6 # First try git-describe, then see if there is a version file
7 # (included in release tarballs), then default
8 -if VN=$(git-describe --abbrev=4 HEAD 2>/dev/null); then
8 +if VN=$(git describe --abbrev=4 HEAD 2>/dev/null); then
9 VN=$(echo "$VN" | sed -e 's/-/./g');
10 elif test -f version
11 then
@@ -16,7 +16,7 @@ fi
16
17 VN=$(expr "$VN" : v*'\(.*\)')
18
19 -dirty=$(sh -c 'git-diff-index --name-only HEAD' 2>/dev/null) || dirty=
19 +dirty=$(sh -c 'git diff-index --name-only HEAD' 2>/dev/null) || dirty=
20 case "$dirty" in
21 '')
22 ;;