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: I414111b27db9951314e6bc7eff8bc1f10775b3ff
changes/38/10138/1
Daniel Willmann 4 years ago
parent d0980be2ec
commit d5f0046ff5
  1. 4
      git-version-gen

@ -92,8 +92,8 @@ fi
if test -n "$v"
then
: # use $v
elif test -d ./.git \
&& v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
elif
v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|| git describe --abbrev=4 HEAD 2>/dev/null` \
&& case $v in
[0-9]*) ;;

Loading…
Cancel
Save