Re: [PATCH] name-rev: introduce the --ref-filter=<regex> option

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

 



On Sat, Feb 17, 2007 at 03:02:36PM +0100, Johannes Schindelin wrote:

> > Instead of (or, in addition to) --tags, to use only tags for naming,
> > you can now use --ref-filter=<regex> to specify which refs are
> > used for naming.
> > 
> > Example:
> > 
> > 	$ git name-rev --ref-filter='/v1' 33db5f4d
> > 	33db5f4d tags/v1.0rc1^0~1593
> 
> Likes, dislikes?

It's a neat idea, but I wonder if you could make it even more flexible
by simply accepting a list of possible refs, and then you could filter
using grep, or your own more complex selection algorithm.
Unfortunately, --stdin is already taken, but something like:

git show-ref | grep tags/v1.4 | git name-rev --stdin-refs 33db5f4d

If the stdin ref format includes both the refname and the hash, you
could even find 'fake' refs that don't exist in git (e.g., that you get
from a foreign SCM; though why you wouldn't just make git tags for them,
I don't know).

Or maybe this is just making the problem too complex, and nobody really
wants to do it. I certainly don't have a use at this point, but if
you're going to do ref filtering, it seems like making it as general as
(painlessly) possible is useful.

-Peff
-
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]