Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

Re: [RFC PATCH] GIT-VERSION-GEN: restrict tags used

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:48:47
Subsystem: the rest · Maintainer: Linus Torvalds

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
-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help