On Thu, Apr 14, 2016 at 3:35 AM, Jeff King <p...@peff.net> wrote:
>
> The cross-prefix behavior I put into the test is not something I feel
> strongly about; it was mostly just restoring the earlier behavior. I do
> think shortening everything is fine, too, as long as there's some way to
> get the fully qualified ref. E.g., if `git branch` shows %(symref:short)
> or %(symref:strip=2), by default, but you can ask for just %(symref) if
> you want (which I think is how you have it implemented now, though I
> notice that symrefs don't get nearly as many formatting options as
> things like %(upstream)).
>

That does make sense, I guess then I'll stick to shortening all symref's
by default and allowing the user to change this if needed via the '--format'
option.

About %(symref) not getting enough formatting options, I don't see anything
else in %(upstream) which would be required in %(symref), maybe the 'strip=X'
option could be added. But for now I see 'short' to be the only needed option.
If anyone feels that something else would be useful, I'd be glad to
add it along.

> If anyone is machine-parsing git-branch output in the first place, they
> are Doing It Wrong. And doubly so if they are relying on some obscure
> shortening rules that I don't think were ever carefully designed. So I
> think we should be free to change it here to what serves users best.
>
> -Peff

This is a good reason, since 'git branch' is a porcelain command a change like
this shouldn't be a problem.

Junio, I'll re-roll with a small fix to the test written by Jeff soon.

-- 
Regards,
Karthik Nayak
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to