Re: [RFC/PATCH] Add interpret-trailers builtin
From: Christian Couder <hidden>
Date: 2016-06-15 22:59:11
On Wed, Nov 6, 2013 at 7:43 AM, Christian Couder [off-list ref] 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
command = echo "$GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"'
would append a s-o-b line only if there is no s-o-b already.
Sorry, I realize that I was wrong above.
As the default for "if_exist" is "dont_repeat", the above would append
a s-o-b if there is no s-o-b or if there is one but with a different
value.
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>"'
Thanks,
Christian.