Re: [PATCH 0/5] make interpret-trailers useful for parsing

2 messages, 2 authors, 2017-08-13 · open the first message on its own page

Re: [PATCH 0/5] make interpret-trailers useful for parsing

From: Junio C Hamano <hidden>
Date: 2017-08-10 18:42:32

Jeff King [off-list ref] writes:
quoted
quoted
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.

Re: [PATCH 0/5] make interpret-trailers useful for parsing

From: Jacob Keller <hidden>
Date: 2017-08-13 19:04:12

On Thu, Aug 10, 2017 at 11:42 AM, Junio C Hamano [off-list ref] wrote:
Jeff King [off-list ref] writes:
quoted
quoted
quoted
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".
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help