All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Eric Blake <ebb9@byu.net>
Cc: git@vger.kernel.org
Subject: Re: git describe candidate filtering
Date: Thu, 13 Dec 2007 00:57:46 -0500	[thread overview]
Message-ID: <20071213055746.GV14735@spearce.org> (raw)
In-Reply-To: <4760C250.5080103@byu.net>

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.

  reply	other threads:[~2007-12-13  5:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13  5:25 git describe candidate filtering Eric Blake
2007-12-13  5:57 ` Shawn O. Pearce [this message]
2007-12-13  6:12   ` 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=20071213055746.GV14735@spearce.org \
    --to=spearce@spearce.org \
    --cc=ebb9@byu.net \
    --cc=git@vger.kernel.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 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.