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 gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: From: Junio C Hamano gits...@pobox.com 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.

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

2013-11-06 Thread Christian Couder
On Wed, Nov 6, 2013 at 7:43 AM, Christian Couder chrisc...@tuxfamily.org 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

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

2013-11-06 Thread Junio C Hamano
Christian Couder christian.cou...@gmail.com 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

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

2013-11-06 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder christian.cou...@gmail.com 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 Junio C Hamano
Christian Couder chrisc...@tuxfamily.org writes: From: Junio C Hamano gits...@pobox.com Christian Couder christian.cou...@gmail.com 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 =

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

2013-11-05 Thread Junio C Hamano
Johan Herland jo...@herland.net writes: On Mon, Nov 4, 2013 at 8:12 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: +{ + char *end = strchr(arg, '='); + if (!end) + end = strchr(arg, ':'); So both '=' (preferred) and ':' are

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

2013-11-05 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org 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

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

2013-11-04 Thread Junio C Hamano
Christian Couder chrisc...@tuxfamily.org 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

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

2013-11-04 Thread Junio C Hamano
Johan Herland jo...@herland.net 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

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 gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: +{ + char *end = strchr(arg, '='); + if (!end) + end = strchr(arg, ':'); So both '=' (preferred) and ':' are accepted as field/value separators. That's

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

2013-11-04 Thread Christian Couder
From: Johan Herland jo...@herland.net On Mon, Nov 4, 2013 at 8:12 PM, Junio C Hamano gits...@pobox.com wrote: Johan Herland jo...@herland.net writes: +{ + char *end = strchr(arg, '='); + if (!end) + end = strchr(arg, ':'); So both '=' (preferred) and ':' are

[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

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

2013-11-03 Thread Johan Herland
On Sun, Nov 3, 2013 at 10:17 PM, Christian Couder chrisc...@tuxfamily.org 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