From: Christian Couder <christian.couder@gmail.com>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>,
Johan Herland <johan@herland.net>,
Josh Triplett <josh@joshtriplett.org>,
Thomas Rast <tr@thomasrast.ch>,
Michael Haggerty <mhagger@alum.mit.edu>,
Dan Carpenter <dan.carpenter@oracle.com>,
Greg Kroah-Hartman <greg@kroah.com>
Subject: Re: [RFC/PATCH] Add interpret-trailers builtin
Date: Wed, 6 Nov 2013 10:23:24 +0100 [thread overview]
Message-ID: <CAP8UFD0STna++2StV1RcT2bB83Lh_hFQU94A0y4ziovs61Z==A@mail.gmail.com> (raw)
In-Reply-To: <20131106.074355.225932577498673677.chriscool@tuxfamily.org>
On Wed, Nov 6, 2013 at 7:43 AM, Christian Couder
<chriscool@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
> 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.
next prev parent reply other threads:[~2013-11-06 9:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-03 21:17 [RFC/PATCH] Add interpret-trailers builtin Christian Couder
2013-11-04 1:01 ` Johan Herland
2013-11-04 19:12 ` Junio C Hamano
2013-11-05 2:45 ` Johan Herland
2013-11-05 5:42 ` Christian Couder
2013-11-05 19:09 ` Junio C Hamano
2013-11-04 19:02 ` Junio C Hamano
2013-11-06 6:43 ` Christian Couder
2013-11-06 9:23 ` Christian Couder [this message]
2013-11-06 17:18 ` Junio C Hamano
2013-11-06 20:16 ` Christian Couder
2013-11-06 20:42 ` Junio C Hamano
2013-11-07 14:57 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAP8UFD0STna++2StV1RcT2bB83Lh_hFQU94A0y4ziovs61Z==A@mail.gmail.com' \
--to=christian.couder@gmail.com \
--cc=chriscool@tuxfamily.org \
--cc=dan.carpenter@oracle.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=greg@kroah.com \
--cc=johan@herland.net \
--cc=josh@joshtriplett.org \
--cc=mhagger@alum.mit.edu \
--cc=tr@thomasrast.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).