Re: [PATCH v3 2/5] pretty: allow showing specific trailers
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 26, 2018, 03:13 UTC
- Message-ID
- <xmqqva4kzg23.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <87a7lw7oct.fsf@0x63.nu>
Anders Waldenborg <anders@0x63.nu> writes:
Show 15 quoted lines
> Junio C Hamano writes: >> Also, use of 'key=' automatically turns on 'only' as described, and >> I tend to agree that it would a convenient default mode (i.e. when >> picking certain trailers only with this mechanism, it is likely that >> the user is willing to use %(subject) etc. to fill in what was lost >> by the implicit use of 'only'), but at the same time, it makes me >> wonder if we need to have a way to countermand an 'only' (or >> 'unfold' for that matter) that was given earlier, e.g. >> >> %(trailers:key=signed-off-by,only=no) >> >> Thanks. > > I'm not sure what that would mean. The non-trailer lines in the trailer > block doesn't match the key.
I was confused by the "only" stuff.
When you give a key (or two), they cannot possibly name non-trailer lines, so while it may be possible to ask "oh, by the way, I also want non-trailer lines in addition to signed-off-by and cc lines", the value of being able to make such a request is dubious.
The value is dubious, but logically it makes it more consistent with the current %(trailers) that lack 'only', which is "oh by the way, I also want non-trailer lines in addition to the trailers with keyword", to allow a way to countermand the 'only' you flip on by default when keywords are given.