Re: [PATCH 4/5] interpret-trailers: add an option to normalize output
- From
Ramsay Jones <ramsay@ramsayjones.plus.com>
- Date
- Aug 10, 2017, 23:02 UTC
- Message-ID
- <98b14604-33f1-6d91-8c9e-ddfa0c5cb0e7@ramsayjones.plus.com>
- In-Reply-To
- <20170810211039.okpwglvcmkngzri2@sigill.intra.peff.net>
On 10/08/17 22:10, Jeff King wrote:
Show 20 quoted lines
> On Thu, Aug 10, 2017 at 11:06:40PM +0200, Christian Couder wrote: > >>>> Related to this, I wonder if people might want to "normalize" in >>>> different ways later. If that happens, we might regret having called >>>> this option "--normalize" instead of "--one-per-line" for example. >>> >>> What is normal? >>> >>> Maybe --style=[one-line, wrapped:72, rfc, json, xml, ...] >>> then? >> >> Yeah, we could go there right now (using perhaps "--pretty" or >> "--format" instead of "--style", so that we are more consistent with >> other commands), but on the other hand we don't know yet if the other >> formats will really be needed. > > But some of those things are not 1:1 mappings with normalization. For > instance, --json presumably implies --only-trailers. Or are we proposing > to break the whole commit message down into components and output it all > as json?
Hmm, to me the operation wasn't so much a normalization, rather it was an --unfold (or maybe --un-fold ;-D). I suppose going in the other direction could be --fold=72, or some such.
[blue is my favourite colour ... :-P ]
ATB, Ramsay Jones