From: Christian Couder Date: Wed, 06 Nov 2013 09:23:24 GMT Subject: Re: [RFC/PATCH] Add interpret-trailers builtin Message-ID: In-Reply-To: <20131106.074355.225932577498673677.chriscool@tuxfamily.org> 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 > 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.