Re: [PATCH] tag: do not show ambiguous tag names as "tags/foo"
- From
Jeff King <peff@peff.net>
- Date
- Jan 25, 2016, 09:56 UTC
- Message-ID
- <20160125095629.GB24452@sigill.intra.peff.net>
- In-Reply-To
- <CAPig+cTq0j0ss=qw9Dx8-PqFA5WJwP0mpvoO+5=NXtOt2EUNww@mail.gmail.com>
On Sun, Jan 24, 2016 at 06:39:05PM -0500, Eric Sunshine wrote:
Show 19 quoted lines
> > Yeah, "strip=2" would also get the job done, and extends more naturally > > to the branch case. > > > > To be honest, I cannot imagine anybody using anything _but_ strip=2, but > > maybe there are special cases, like: > > > > git for-each-ref --format='%(refname:strip=3)' refs/heads/jk/ > > > > to get my list of topics, sans initials. > > What if the option was named ":stripprefix=" in its most general form: > > %(refname:stripprefix=refs/tags/) > > with plain: > > %(refname:stripprefix) > > shorthand for ":stripprefix=refs/*/" or something?
That would work, though I was really hoping not to get into something as complicated as globbing. I'm not sure it really buys us that much here.
-Peff