git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 11, 2010, 23:05 UTC
Message-ID
<20100511230542.GC31163@progeny.tock>
In-Reply-To
<20100511230100.GB31163@progeny.tock>
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@gmail.com>
---
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
Previous: Jonathan NiederNext: Tay Ray Chuan
Message 3 of 6 in “GIT-VERSION-GEN: restrict tags used”
  1. GIT-VERSION-GEN: restrict tags usedTay Ray Chuan, May 11, 2010
  2. Jonathan NiederMay 11, 2010
  3. Jonathan NiederMay 11, 2010
  4. Tay Ray ChuanMay 12, 2010
  5. GIT-VERSION-GEN: restrict tags usedTay Ray Chuan, May 12, 2010
  6. Junio C HamanoMay 12, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.