Skip to content

Commit 05a9506

Browse files
seveasgitster
authored andcommitted
GIT-VERSION-GEN: support non-standard $GIT_DIR path
make and make test both work when $GIT_DIR isn't .git, but make dist included a bogus GIT-VERSION-FILE. Signed-off-by: Dennis Kaarsemaker <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 04a74b6 commit 05a9506

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GIT-VERSION-GEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LF='
1111
if test -f version
1212
then
1313
VN=$(cat version) || VN="$DEF_VER"
14-
elif test -d .git -o -f .git &&
14+
elif test -d ${GIT_DIR:-.git} -o -f .git &&
1515
VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
1616
case "$VN" in
1717
*$LF*) (exit 1) ;;

0 commit comments

Comments
 (0)