* git describe candidate filtering
@ 2007-12-13 5:25 Eric Blake
2007-12-13 5:57 ` Shawn O. Pearce
0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2007-12-13 5:25 UTC (permalink / raw)
To: git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Would it be possible to add an option to git-describe that limits the
candidate tags to those matching a glob pattern or regular expression?
I've got a repository imported from CVS which has a number of less
interesting tags for events such as branch creation, but I'm only
interested in describing the current commit relative to tags matching
v[0-9]\.[0-9]*, rather than the closest tag of any spelling.
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHYMJQ84KuGfSFAYARAsd8AKCwuCZsxZBcV3nd849Saxvch/OZiACfagTe
mitsZEVhXy7hyBg0KALQG0o=
=Qq8n
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git describe candidate filtering
2007-12-13 5:25 git describe candidate filtering Eric Blake
@ 2007-12-13 5:57 ` Shawn O. Pearce
2007-12-13 6:12 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2007-12-13 5:57 UTC (permalink / raw)
To: Eric Blake; +Cc: git
Eric Blake <ebb9@byu.net> wrote:
> Would it be possible to add an option to git-describe that limits the
> candidate tags to those matching a glob pattern or regular expression?
> I've got a repository imported from CVS which has a number of less
> interesting tags for events such as branch creation, but I'm only
> interested in describing the current commit relative to tags matching
> v[0-9]\.[0-9]*, rather than the closest tag of any spelling.
Sure, it shouldn't be too difficult, just need to alter the get_name()
function to add the item with add_to_known_names() only if it matches
the pattern. Take a look at builtin-describe.c around line 74...
We only match things that were "added". So if you don't add a tag
via add_to_known_names() then git-describe won't return it.
However that's only true for the standard case; for --contains its
a different story as we are actually passing everything to name-rev.
--
Shawn.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git describe candidate filtering
2007-12-13 5:57 ` Shawn O. Pearce
@ 2007-12-13 6:12 ` Junio C Hamano
0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2007-12-13 6:12 UTC (permalink / raw)
To: Shawn O. Pearce; +Cc: Eric Blake, git
"Shawn O. Pearce" <spearce@spearce.org> writes:
> We only match things that were "added". So if you don't add a tag
> via add_to_known_names() then git-describe won't return it.
>
> However that's only true for the standard case; for --contains its
> a different story as we are actually passing everything to name-rev.
A good news is that name-rev is supposed to respect the name limiter.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-13 6:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-13 5:25 git describe candidate filtering Eric Blake
2007-12-13 5:57 ` Shawn O. Pearce
2007-12-13 6:12 ` Junio C Hamano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.