Re: [PATCH] pretty-print: de-tabify indented logs to make things line up properly
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Mar 16, 2016, 22:04 UTC
- Message-ID
- <CA+55aFwbev52kTV1wNMTsxR3kWvhXxTkjVy-KQOEO_2jX3RrAQ@mail.gmail.com>
- In-Reply-To
- <xmqqk2l23xzc.fsf@gitster.mtv.corp.google.com>
On Wed, Mar 16, 2016 at 2:37 PM, Junio C Hamano <gitster@pobox.com> 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 shortlog by definition can't have any issues with multiple lines lining up with each other.
At the same time, it might be a bit odd to show tabs in that first line differently for the one-line vs multi-line log version. But maybe it isn't - I think shortlog is the only thing that does that wrapping anyway, so shortlog is already special.
I think the reason shortlog output gets both the de-tab and the wrapping is that shortlog_add_commit() just calls pretty_print_commit with CMIT_FMT_USERFORMAT.
Linus