Detect version from git submodule

This commit is contained in:
pelya
2014-03-15 19:53:53 +02:00
parent 6dc8be0332
commit d7b18a8e2d
2 changed files with 2 additions and 2 deletions

View File

@@ -1035,7 +1035,7 @@ check_params() {
# of the tags folder, the folder of the tag does not have a .svn folder
# anymore and this fails to detect the subversion repository checkout.
log 1 "checking revision... svn detection (tag)"
elif [ -d "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
elif [ -e "$ROOT_DIR/.git" ] && [ -n "`git help 2>/dev/null`" ]; then
log 1 "checking revision... git detection"
elif [ -d "$ROOT_DIR/.hg" ] && [ -n "`hg help 2>/dev/null`" ]; then
log 1 "checking revision... hg detection"

View File

@@ -84,7 +84,7 @@ if [ -d "$ROOT_DIR/.svn" ] || [ -d "$ROOT_DIR/../.svn" ]; then
else
REV="r$REV_NR"
fi
elif [ -d "$ROOT_DIR/.git" ]; then
elif [ -e "$ROOT_DIR/.git" ]; then
# We are a git checkout
# Refresh the index to make sure file stat info is in sync, then look for modifications
git update-index --refresh >/dev/null