mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-17 12:41:05 +03:00
git-version-gen: detect untagged revisions
* build-aux/git-version-gen: If fallback string is empty, but git is available, use "git describe --always" to extract a revision, and prefix it with "g". This is much better than responding "UNKNOWN" and it applies to shallow clones!
This commit is contained in:
committed by
Pádraig Brady
parent
f2c88dc128
commit
bedd7833ac
@@ -1,3 +1,11 @@
|
||||
2015-04-14 Mats Erik Andersson <gnu@gisladisker.se>
|
||||
|
||||
git-version-gen: detect untagged revisions
|
||||
* build-aux/git-version-gen: If fallback string is empty,
|
||||
but git is available, use "git describe --always" to extract
|
||||
a revision, and prefix it with "g". This is much better than
|
||||
responding "UNKNOWN" and it applies to shallow clones!
|
||||
|
||||
2015-04-14 HIRAMATSU Yoshifumi <hiramatu@boreas.dti.ne.jp>
|
||||
|
||||
fseeko: fix build failure on NetBSD >= 6 (trivial)
|
||||
|
@@ -189,7 +189,11 @@ then
|
||||
v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
|
||||
v_from_git=1
|
||||
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
|
||||
if v=g`git describe --always HEAD 2>/dev/null`; then
|
||||
v_from_git=1
|
||||
else
|
||||
v=UNKNOWN
|
||||
fi
|
||||
else
|
||||
v=$fallback
|
||||
fi
|
||||
|
Reference in New Issue
Block a user