Re: [PATCH 0/5] make interpret-trailers useful for parsing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 10, 2017, 18:42 UTC
- Message-ID
- <xmqqd1834645.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170810072822.rj6y6zcqhyfz4yi7@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
>> > The above example made me wonder if we also want a format specifier >> > to do the above without piping, but it turns out that we already >> > have "log --format=%(trailers)", so we are good ;-) >> >> I was going to say, I thought we had a way to get trailers for a >> commit via the pretty format, since that is what i used in the past. > > I do like that you could get the trailers for many commits in a single > invocation. That doesn't matter for my current use-case, but obviously > piping through O(n) interpret-trailers invocations is a bad idea. > But there are a few difficulties with using %(trailers) for this,...
I think it is clear to you, but it may not be clear to others, that I did not mean to say "because 'log --format' already knows about it, this change to interpret-trailers is unnecessary".
> For (1) I think many callers would prefer to see the original > formatting. Maybe we'd need a %(trailers:normalize) or something.
Thanks; that is exactly the line of thought I had in the back of my head without even realizing when I brought up %(trailers) format element.