Re: [RFC PATCH] show decorations at the end of the line

2017-02-21 Thread Jeff King
On Tue, Feb 21, 2017 at 01:47:37PM -0800, Junio C Hamano wrote: > > So the best I could come up with is: > > > > git config pretty.twoline '%C(auto)%h %s%C(auto)%+d' > > git log --format=twoline > > [...] > > Yeah, I had a similar thought to use something around "%n%-d", but > > $ git log

Re: [RFC PATCH] show decorations at the end of the line

2017-02-21 Thread Junio C Hamano
Jeff King writes: > The for-each-ref formatting code has %(if), but it's not unified with > the commit-format ones. > > So the best I could come up with is: > > git config pretty.twoline '%C(auto)%h %s%C(auto)%+d' > git log --format=twoline > > which looks like: > >

Re: [RFC PATCH] show decorations at the end of the line

2017-02-21 Thread Jeff King
On Tue, Feb 21, 2017 at 12:40:11PM -0800, Linus Torvalds wrote: > In fact, I played around with some formats, and the one I lines the > most was actually one that split the line for decorations, but that > one was admittedly pretty funky. It gives output like > > b9df16a4c (HEAD -> master) >

Re: [RFC PATCH] show decorations at the end of the line

2017-02-21 Thread Linus Torvalds
On Tue, Feb 21, 2017 at 12:11 PM, Junio C Hamano wrote: > > The updated organization smells a lot better to me ;-) So I have been using the original patch for a bit over a week now, and I have to say that I'm not sure it's the right thing to do after all. Most of the time I

Re: [RFC PATCH] show decorations at the end of the line

2017-02-21 Thread Junio C Hamano
Linus Torvalds writes: > That source showing should never have been in "show_decorations()" in > the first place. It just happened to be a convenient place for it. > > So this attached patch is just my original patch updated to split up > "show_source()" from

Re: [RFC PATCH] show decorations at the end of the line

2017-02-19 Thread Linus Torvalds
On Sun, Feb 19, 2017 at 4:46 PM, Jeff King wrote: > > I think there are two potential patches: > > 1. Add a custom-format placeholder for the --source value. > This is an obvious improvement that doesn't hurt anyone. Right. > 2. Switch --decorate to the end by default,

Re: [RFC PATCH] show decorations at the end of the line

2017-02-19 Thread Junio C Hamano
Jeff King writes: > I think there are two potential patches: > > 1. Add a custom-format placeholder for the --source value. > This is an obvious improvement that doesn't hurt anyone. > > 2. Switch --decorate to the end by default, but _not_ --source. > > This use

Re: [RFC PATCH] show decorations at the end of the line

2017-02-19 Thread Jeff King
On Sun, Feb 19, 2017 at 03:03:21PM -0800, Jacob Keller wrote: > >> I just got bitten by a fallout. I have > >> > >> $ git recent --help > >> `git recent' is aliased to `log --oneline --branches --no-merges \ > >> --source --since=3.weeks' > >> > >> but now the branch names are

Re: [RFC PATCH] show decorations at the end of the line

2017-02-19 Thread Jacob Keller
On Sun, Feb 19, 2017 at 2:33 PM, Linus Torvalds wrote: > On Fri, Feb 17, 2017 at 9:27 PM, Junio C Hamano wrote: >> >> I just got bitten by a fallout. I have >> >> $ git recent --help >> `git recent' is aliased to `log --oneline

Re: [RFC PATCH] show decorations at the end of the line

2017-02-19 Thread Linus Torvalds
On Fri, Feb 17, 2017 at 9:27 PM, Junio C Hamano wrote: > > I just got bitten by a fallout. I have > > $ git recent --help > `git recent' is aliased to `log --oneline --branches --no-merges \ > --source --since=3.weeks' > > but now the branch names are shown at

Re: [RFC PATCH] show decorations at the end of the line

2017-02-17 Thread Junio C Hamano
Jeff King writes: >> The updates to the expectation look like this (already squashed). >> The --source decorations in 4202 are also shown at the end, which >> probably is in line with the way --show-decorations adds them at the >> end of the line, but was somewhat surprising from

Re: [RFC PATCH] show decorations at the end of the line

2017-02-14 Thread Jeff King
On Tue, Feb 14, 2017 at 02:11:06PM -0800, Junio C Hamano wrote: > Junio C Hamano writes: > > > Thanks. We'd need to update the tests that expects the old style > > output, though. > > The updates to the expectation look like this (already squashed). > The --source

Re: [RFC PATCH] show decorations at the end of the line

2017-02-14 Thread Junio C Hamano
Junio C Hamano writes: > Thanks. We'd need to update the tests that expects the old style > output, though. The updates to the expectation look like this (already squashed). The --source decorations in 4202 are also shown at the end, which probably is in line with the way

Re: [RFC PATCH] show decorations at the end of the line

2017-02-14 Thread Stephan Beyer
Hi, On 02/13/2017 09:30 AM, Junio C Hamano wrote: > Linus Torvalds writes: > >> On Sat, Feb 11, 2017 at 10:02 AM, Linus Torvalds >> wrote: >>> >>> I've signed off on this, because I think it's an "obvious" improvement, >>> but I'm

Re: [RFC PATCH] show decorations at the end of the line

2017-02-13 Thread Jeff King
On Mon, Feb 13, 2017 at 01:01:49PM -0800, Junio C Hamano wrote: > Linus Torvalds writes: > > > And if you actually want decorations, and you're parsing them, you are > > *not* going to script it with "--oneline --decorations", because the > > end result is

Re: [RFC PATCH] show decorations at the end of the line

2017-02-13 Thread Junio C Hamano
Linus Torvalds writes: > And if you actually want decorations, and you're parsing them, you are > *not* going to script it with "--oneline --decorations", because the > end result is basically impossible to parse already (because it's > ambiguous - think about

Re: [RFC PATCH] show decorations at the end of the line

2017-02-13 Thread Linus Torvalds
On Mon, Feb 13, 2017 at 12:30 AM, Junio C Hamano wrote: > > An obvious downside is that people (against all recommendations) are > likely to have written a loose script expecting the --oneline format > is cast in stone. Actually, I don't believe that is the case wrt

Re: [RFC PATCH] show decorations at the end of the line

2017-02-13 Thread Junio C Hamano
Linus Torvalds writes: > On Sat, Feb 11, 2017 at 10:02 AM, Linus Torvalds > wrote: >> >> I've signed off on this, because I think it's an "obvious" improvement, >> but I'm putting the "RFC" in the subject line because this is clearly

Re: [RFC PATCH] show decorations at the end of the line

2017-02-11 Thread Linus Torvalds
On Sat, Feb 11, 2017 at 10:02 AM, Linus Torvalds wrote: > > I've signed off on this, because I think it's an "obvious" improvement, > but I'm putting the "RFC" in the subject line because this is clearly a > subjective thing. Side note: the one downside of showing

[RFC PATCH] show decorations at the end of the line

2017-02-11 Thread Linus Torvalds
So I use "--show-decorations" all the time because I find it very useful to see where the origin branch is, where tags are etc. In fact, my global git config file has [log] decorate = auto in it, so that I don't have to type it out all the time when I just do my usual 'git log".