Re: [PATCH v3 2/5] pretty: allow showing specific trailers

2018-11-25 Thread Junio C Hamano
Anders Waldenborg writes: > Would it feel less inconsistent if it did not set the 'only_trailers' > option? If %(trailers:key=...) did not automatically imply 'only', it would be very consistent. But as I already said, I think it would be less convenient, as I do suspect that those who want

Re: [PATCH v3 2/5] pretty: allow showing specific trailers

2018-11-25 Thread Anders Waldenborg
Junio C Hamano writes: > 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

Re: [PATCH v3 2/5] pretty: allow showing specific trailers

2018-11-25 Thread Junio C Hamano
Anders Waldenborg writes: > 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

Re: [PATCH v3 2/5] pretty: allow showing specific trailers

2018-11-25 Thread Anders Waldenborg
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

Re: [PATCH v3 2/5] pretty: allow showing specific trailers

2018-11-19 Thread Junio C Hamano
Anders Waldenborg writes: > + followed by a colon and zero or more comma-separated options: > + ** 'only': omit non-trailer lines from the trailer block. > + ** 'unfold': make it behave as if interpret-trailer's `--unfold` > + option was given. > + ** 'key=': only show trailers with

Re: [PATCH v3 2/5] pretty: allow showing specific trailers

2018-11-19 Thread Junio C Hamano
Anders Waldenborg writes: > + followed by a colon and zero or more comma-separated options: > + ** 'only': omit non-trailer lines from the trailer block. > + ** 'unfold': make it behave as if interpret-trailer's `--unfold` > + option was given. > + ** 'key=': only show trailers with

[PATCH v3 2/5] pretty: allow showing specific trailers

2018-11-18 Thread Anders Waldenborg
Adds a new "key=X" option to "%(trailers)" which will cause it to only print trailers lines which match the specified key. Signed-off-by: Anders Waldenborg --- Documentation/pretty-formats.txt | 17 +-- pretty.c | 31 ++-