Re: [PATCH 1/3] trailer: add a trailer.trimEmpty config option

2015-02-10 Thread Junio C Hamano
Christian Couder writes: > On Sat, Feb 7, 2015 at 9:20 PM, Junio C Hamano wrote: > >> Another problem I have with "filter out during the output phase" >> comes from the semantics/correctness in the resulting code, and I >> suspect that it would need to be done a lot earlier, before you >> allow

Re: [PATCH 1/3] trailer: add a trailer.trimEmpty config option

2015-02-10 Thread Junio C Hamano
Christian Couder writes: > I think that very few new features are now needed to make it possible > to use the code in other commands like commit, format-patch, am, etc, > but this patch implements one of the needed features. > >> - do "trailer stuff" by calling a central helper that does >>

Re: [PATCH 1/3] trailer: add a trailer.trimEmpty config option

2015-02-09 Thread Junio C Hamano
Christian Couder writes: > It is not designed like this because you only asked me to design it > like this after the facts, when there was another email thread about > conflicts blocks and one function you created could be used by the > trailer code too. > > If you had asked this from the beginni

Re: [PATCH 1/3] trailer: add a trailer.trimEmpty config option

2015-02-07 Thread Christian Couder
On Sat, Feb 7, 2015 at 9:20 PM, Junio C Hamano wrote: > Christian Couder writes: > >> This way people who always want trimed trailers >> don't need to specify it on the command line. > > I sense that print_all() that cares about trimming illustrate a > design mistake in the original code structur

Re: [PATCH 1/3] trailer: add a trailer.trimEmpty config option

2015-02-07 Thread Junio C Hamano
Christian Couder writes: > This way people who always want trimed trailers > don't need to specify it on the command line. I sense that print_all() that cares about trimming illustrate a design mistake in the original code structure. Why isn't the entire program structured like this instead?

[PATCH 1/3] trailer: add a trailer.trimEmpty config option

2015-02-07 Thread Christian Couder
This way people who always want trimed trailers don't need to specify it on the command line. Signed-off-by: Christian Couder --- builtin/interpret-trailers.c | 2 +- trailer.c| 13 ++--- trailer.h| 2 +- 3 files changed, 12 insertions(+), 5 dele