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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder wrote:
> Tay Ray Chuan wrote:

>> 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 <jrnieder@xxxxxxxxx>
---
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
-- 
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]