Re: [PATCH 0/5] make interpret-trailers useful for parsing
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Aug 13, 2017, 19:03 UTC
- Message-ID
- <CA+P7+xoLNzVE4ogw+TEij=DtZM4648Jz3JvxdMBQnUb9t+Ez5A@mail.gmail.com>
- In-Reply-To
- <xmqqd1834645.fsf@gitster.mtv.corp.google.com>
On Thu, Aug 10, 2017 at 11:42 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
> Jeff King <peff@peff.net> writes: > >>> > 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.
I'll add that I also think this patch series is good, it's useful to have a separate command.
Thanks, Jake