Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-07 Thread Christian Couder
On Wed, Nov 6, 2013 at 9:42 PM, Junio C Hamano wrote: > Christian Couder writes: >> From: Junio C Hamano >> >>> But that is insufficient to emulate what we do, no? I.e. append >>> unless the last one is from the same person we are about to add. >> >> Yeah, but, with DONT_REPEAT_PREVIOUS, it wou

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-06 Thread Junio C Hamano
Christian Couder writes: > From: Junio C Hamano > >> Christian Couder writes: >> >>> To append a s-o-b only if there is no s-o-b already, one would need to use: >>> >>> [trailer "signoff"] >>> key = "Signed-off-by:" >>> if_exist = dont_append >>> if_missing = append

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-06 Thread Christian Couder
From: Junio C Hamano > Christian Couder writes: > >> To append a s-o-b only if there is no s-o-b already, one would need to use: >> >> [trailer "signoff"] >> key = "Signed-off-by:" >> if_exist = dont_append >> if_missing = append >> command = echo "$GIT_COMMI

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-06 Thread Junio C Hamano
Christian Couder writes: > To append a s-o-b only if there is no s-o-b already, one would need to use: > > [trailer "signoff"] > key = "Signed-off-by:" > if_exist = dont_append > if_missing = append > command = echo "$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"'

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-06 Thread Christian Couder
On Wed, Nov 6, 2013 at 7:43 AM, Christian Couder wrote: > Of course in the latter case, a command should probably be specified > to tell which value should be used with the key. > > For example: > > [trailer "signoff"] > key = "Signed-off-by:" > if_missing = append > com

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-05 Thread Christian Couder
From: Junio C Hamano > Christian Couder writes: >> >> * "trailer" seems better than "commitTrailer" as the config key because >> it looks like all the config keys are lower case and "committrailer" is not >> very readable. > > And closes the door for other things from later acquiring trailers?

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-05 Thread Junio C Hamano
Johan Herland writes: > On Mon, Nov 4, 2013 at 8:12 PM, Junio C Hamano wrote: >> Johan Herland writes: +{ + char *end = strchr(arg, '='); + if (!end) + end = strchr(arg, ':'); >>> >>> So both '=' (preferred) and ':' are accepted as field/value >>> s

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-04 Thread Christian Couder
From: Johan Herland > On Mon, Nov 4, 2013 at 8:12 PM, Junio C Hamano wrote: >> Johan Herland writes: +{ + char *end = strchr(arg, '='); + if (!end) + end = strchr(arg, ':'); >>> >>> So both '=' (preferred) and ':' are accepted as field/value >>> sepa

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-04 Thread Johan Herland
On Mon, Nov 4, 2013 at 8:12 PM, Junio C Hamano wrote: > Johan Herland writes: >>> +{ >>> + char *end = strchr(arg, '='); >>> + if (!end) >>> + end = strchr(arg, ':'); >> >> So both '=' (preferred) and ':' are accepted as field/value >> separators. That's ok for the comma

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-04 Thread Junio C Hamano
Johan Herland writes: Thanks for looking this over. I am mostly in agreement and will elide the parts I do not have much to add. >> This command should help with RFC 822 style headers, called >> "trailers", that are found at the end of commit messages. > > As has been asked earlier in this disc

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-04 Thread Junio C Hamano
Christian Couder writes: > This RFC patch shows the work in progress to implement a new > command: > > git interpret-trailers > > 1) Rational: > > This command should help with RFC 822 style headers, called > "trailers", that are found at the end of commit messages. > > For a long time, the

Re: [RFC/PATCH] Add interpret-trailers builtin

2013-11-03 Thread Johan Herland
On Sun, Nov 3, 2013 at 10:17 PM, Christian Couder wrote: > This RFC patch shows the work in progress to implement a new > command: First of all: Thanks for working on this! This looks like a really good start. Plenty of comments below (mostly either to learn myself, or to check what alternatives

[RFC/PATCH] Add interpret-trailers builtin

2013-11-03 Thread Christian Couder
This RFC patch shows the work in progress to implement a new command: git interpret-trailers 1) Rational: This command should help with RFC 822 style headers, called "trailers", that are found at the end of commit messages. For a long time, these trailers have become a de facto standard