Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-20 Thread Linus Torvalds
On Wed, Mar 16, 2016 at 9:29 AM, Linus Torvalds wrote: > > This should all line up: > > Column 1 Column 2 > > A B > ABCD EFGH > SPACESInstead of Tabs > > Even with multi-byte UTF8 characters: > >

Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-20 Thread Linus Torvalds
On Wed, Mar 16, 2016 at 12:32 PM, Junio C Hamano wrote: > > may give us a better structure if we are going to give users a knob > to disable this tab expansion, i.e. move the addition of 4 spaces to > the caller, name the body of such a function strbuf_expand_add(), > and then

Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-19 Thread Linus Torvalds
On Wed, Mar 16, 2016 at 11:01 AM, Junio C Hamano wrote: > > (1) if turning your "preparation; do { ... } while()" into > "while () { }" would make the result a bit easier to read; So it's probably partly taste, but I will also disagree with your "easier to read", because

Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-19 Thread Junio C Hamano
Linus Torvalds <torva...@linux-foundation.org> writes: > From: Linus Torvalds <torva...@linux-foundation.org> > Date: Wed, 16 Mar 2016 09:15:53 -0700 > Subject: [PATCH] pretty-print: de-tabify indented logs to make things line up > properly > > This should all line

Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-19 Thread Junio C Hamano
Linus Torvalds writes: > On Wed, Mar 16, 2016 at 12:47 PM, Junio C Hamano wrote: >> >> Strangely running t4201 with your patch (without any squashing) >> seems to show a breakage in shortlog. I won't be able to come back >> to this topic for at

Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-19 Thread Junio C Hamano
Linus Torvalds writes: > On Wed, Mar 16, 2016 at 11:01 AM, Junio C Hamano wrote: >> >> (1) if turning your "preparation; do { ... } while()" into >> "while () { }" would make the result a bit easier to read; > > So it's probably partly

Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-19 Thread Junio C Hamano
Junio C Hamano writes: > The above is most likely what I would have written if I were doing > this patch. I could squash it to save a round-trip, but let me run > the testsuite first to see if we need adjustments to existing tests. Strangely running t4201 with your patch

Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-19 Thread Linus Torvalds
On Wed, Mar 16, 2016 at 12:47 PM, Junio C Hamano wrote: > > Strangely running t4201 with your patch (without any squashing) > seems to show a breakage in shortlog. I won't be able to come back > to this topic for at least a few hours, so this is just a single bit > "breaks"

Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-19 Thread Junio C Hamano
Linus Torvalds writes: > Here's an incremental patch that could be just smushed into my > previous one. It doesn't change the behavior of "pp_handle_indent()", > but I think it clarifies the code and makes future changes much easier > (partly because now nobody has

Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-18 Thread Linus Torvalds
On Wed, Mar 16, 2016 at 2:37 PM, Junio C Hamano wrote: > > What surprised me was that this new expand logic triggered for > shortlog, actually. I somehow assumed the caller that called > de-tabify helper was only called for --pretty=medium. I guess that would be ok, since

[PATCH] pretty-print: de-tabify indented logs to make things line up properly

2016-03-18 Thread Linus Torvalds
From: Linus Torvalds <torva...@linux-foundation.org> Date: Wed, 16 Mar 2016 09:15:53 -0700 Subject: [PATCH] pretty-print: de-tabify indented logs to make things line up properly This should all line up: Column 1 Column 2 A B ABCD