path: root/git-version-gen
diff options
authorDaniel Willmann <dwillmann@sysmocom.de>2018-07-24 17:51:58 +0200
committerDaniel Willmann <dwillmann@sysmocom.de>2018-07-24 18:05:46 +0200
commit153cd39c223e4c55d9fb220d49c812ebdf8e7e81 (patch)
treeaaf54f3c11a157e2229b8a956af0ba8b16b49626 /git-version-gen
parent1c6ab612b294892317d6a5c79f4d1b7ee770c171 (diff)
git-version-gen: Don't check for .git directory
This check is not in all our repos that use git-version-gen. Indeed it seems to be a leftover of openbsc where I think it wanted to ensure being called in the openbsc subfolder or something? libosmocore e.g. doesn't have it. In any case .git being a directory is not always true (if using git worktree) so remove this check. Change-Id: I9d895fa90991d47e9626a8e7fa701540b658194c
Diffstat (limited to 'git-version-gen')
1 files changed, 2 insertions, 2 deletions
diff --git a/git-version-gen b/git-version-gen
index 8e59c5afa..42cf3d2bd 100755
--- a/git-version-gen
+++ b/git-version-gen
@@ -92,8 +92,8 @@ fi
if test -n "$v"
: # use $v
-elif test -d ./.git \
- && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
+ v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& case $v in
[0-9]*) ;;