On Sun, Jan 24, 2016 at 06:39:05PM -0500, Eric Sunshine wrote:

> > 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to