Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-11 Thread Christian Couder
On Fri, Aug 11, 2017 at 11:06 AM, Jeff King wrote: > On Fri, Aug 11, 2017 at 09:02:24AM +0200, Christian Couder wrote: > >> > But I really don't want callers to think of it as "unfold". I want it to >> > be "turn this into something I can parse simply". Hence if we were to >> > find another case w

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-11 Thread Jeff King
On Fri, Aug 11, 2017 at 09:02:24AM +0200, Christian Couder wrote: > > But I really don't want callers to think of it as "unfold". I want it to > > be "turn this into something I can parse simply". Hence if we were to > > find another case where the output is irregular, I'd feel comfortable > > cal

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-11 Thread Christian Couder
On Fri, Aug 11, 2017 at 1:10 AM, Jeff King wrote: > On Fri, Aug 11, 2017 at 12:02:49AM +0100, Ramsay Jones wrote: > >> > 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 comm

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Ramsay Jones
On 11/08/17 00:10, Jeff King wrote: > On Fri, Aug 11, 2017 at 12:02:49AM +0100, Ramsay Jones wrote: > >>> 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

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
On Fri, Aug 11, 2017 at 12:02:49AM +0100, Ramsay Jones wrote: > > 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

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Ramsay Jones
On 10/08/17 22:10, Jeff King wrote: > 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 "--o

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
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

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Christian Couder
On Thu, Aug 10, 2017 at 9:44 PM, Stefan Beller wrote: > On Thu, Aug 10, 2017 at 12:39 PM, Christian Couder > wrote: >> On Thu, Aug 10, 2017 at 8:37 PM, Jeff King wrote: >>> On Thu, Aug 10, 2017 at 11:35:00AM -0700, Stefan Beller wrote: >>> On Thu, Aug 10, 2017 at 1:03 AM, Jeff King wrote:

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Christian Couder
On Thu, Aug 10, 2017 at 9:42 PM, Jeff King wrote: > On Thu, Aug 10, 2017 at 09:39:21PM +0200, Christian Couder wrote: > >> > If you prefer the normalized form (and the input was line-broken in a >> > way that you don't like), then this would convert to your preferred >> > form. I agree that you co

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Stefan Beller
On Thu, Aug 10, 2017 at 12:39 PM, Christian Couder wrote: > On Thu, Aug 10, 2017 at 8:37 PM, Jeff King wrote: >> On Thu, Aug 10, 2017 at 11:35:00AM -0700, Stefan Beller wrote: >> >>> On Thu, Aug 10, 2017 at 1:03 AM, Jeff King wrote: >>> > The point of "--only-trailers" is to give a caller an out

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 09:39:21PM +0200, Christian Couder wrote: > > If you prefer the normalized form (and the input was line-broken in a > > way that you don't like), then this would convert to your preferred > > form. I agree that you could potentially want the opposite (folding long > > lines

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Christian Couder
On Thu, Aug 10, 2017 at 8:37 PM, Jeff King wrote: > On Thu, Aug 10, 2017 at 11:35:00AM -0700, Stefan Beller wrote: > >> On Thu, Aug 10, 2017 at 1:03 AM, Jeff King wrote: >> > The point of "--only-trailers" is to give a caller an output >> > that's easy for them to parse. Getting rid of the >> > n

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
On Thu, Aug 10, 2017 at 11:35:00AM -0700, Stefan Beller wrote: > On Thu, Aug 10, 2017 at 1:03 AM, Jeff King wrote: > > The point of "--only-trailers" is to give a caller an output > > that's easy for them to parse. Getting rid of the > > non-trailer material helps, but we still may see more > > c

Re: [PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Stefan Beller
On Thu, Aug 10, 2017 at 1:03 AM, Jeff King wrote: > The point of "--only-trailers" is to give a caller an output > that's easy for them to parse. Getting rid of the > non-trailer material helps, but we still may see more > complicated syntax like whitespace continuation. Let's add > an option to n

[PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-10 Thread Jeff King
The point of "--only-trailers" is to give a caller an output that's easy for them to parse. Getting rid of the non-trailer material helps, but we still may see more complicated syntax like whitespace continuation. Let's add an option to normalize the output into one "key: value" line per trailer.

[PATCH 4/5] interpret-trailers: add an option to normalize output

2017-08-09 Thread Jeff King
The point of "--only-trailers" is to give a caller an output that's easy for them to parse. Getting rid of the non-trailer material helps, but we still may see more complicated syntax like whitespace continuation. Let's add an option to normalize the output into one "key: value" line per trailer.