Jonathan Nieder wrote:
Tay Ray Chuan wrote:
quoted
since git's tags for git-core (ie. excluding git-gui)
are all of the form "vX.Y...".
git gui’s too, now.
Aggh --- sent early, there. Here is what I meant to say.
Shawn, this helps avoid any stray (annotated) tags the user may have
made, following Tay’s example.
Signed-off-by: Jonathan Nieder <redacted>
---
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index b3f937e..d6a6601 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -13,7 +13,7 @@ tree_search ()
for p in $(git rev-list --parents --max-count=1 $head 2>/dev/null)
do
test $tree = $(git rev-parse $p^{tree} 2>/dev/null) &&
- vn=$(git describe --abbrev=4 $p 2>/dev/null) &&
+ vn=$(git describe --match=gitgui-[0-9]* --abbrev=4 $p 2>/dev/null) &&
case "$vn" in
gitgui-[0-9]*) echo $vn; break;;
esac--