git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	"Shawn O. Pearce" <spearce@spearce.org>
Subject: Re: [RFC PATCH] GIT-VERSION-GEN: restrict tags used
Date: Tue, 11 May 2010 18:05:42 -0500	[thread overview]
Message-ID: <20100511230542.GC31163@progeny.tock> (raw)
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
-- 

  reply	other threads:[~2010-05-11 23:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-11 17:33 [RFC PATCH] GIT-VERSION-GEN: restrict tags used Tay Ray Chuan
2010-05-11 23:01 ` Jonathan Nieder
2010-05-11 23:05   ` Jonathan Nieder [this message]
2010-05-12  3:23   ` Tay Ray Chuan
2010-05-12  3:29     ` [PATCH] " Tay Ray Chuan
2010-05-12  5:54       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100511230542.GC31163@progeny.tock \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=rctay89@gmail.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).