public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
To: "Michael S. Tsirkin" <mst@redhat•com>
Cc: git@vger•kernel.org, Junio C Hamano <gitster@pobox•com>
Subject: Re: git interpret-trailers with multiple keys
Date: Wed, 06 Apr 2016 18:58:30 +0200	[thread overview]
Message-ID: <vpqlh4qbrnt.fsf@anie.imag.fr> (raw)
In-Reply-To: <20160406191054-mutt-send-email-mst@redhat.com> (Michael S. Tsirkin's message of "Wed, 6 Apr 2016 19:12:56 +0300")

"Michael S. Tsirkin" <mst@redhat•com> writes:

> I have this in .git/config
>
> [trailer "r"]
>         key = Reviewed-by
>         command = "echo \"Michael S. Tsirkin <mst@redhat•com\""
> [trailer "s"]
>         key = Signed-off-by
>         command = "echo \"Michael S. Tsirkin <mst@redhat•com\""
>
> whenever I run git interpret-trailers -t r I see these lines added:
>
> Reviewed-by: Michael S. Tsirkin <mst@redhat•com
> Signed-off-by: Michael S. Tsirkin <mst@redhat•com
> Reviewed-by: Michael S. Tsirkin <mst@redhat•com
>
> Why is Reviewed-by repeated?  Bug or feature?

The first two lines are added unconditionally:

$ echo | git interpret-trailers 

Reviewed-by: Michael S. Tsirkin <mst@redhat•com
Signed-off-by: Michael S. Tsirkin <mst@redhat•com

The last line is added because you've asked for it with --trailer r.

I don't think it's currently possible to get the behavior you seem to
expect, ie. to define trailer tokens fully (key and value) in your
config file but use them only on request.

(BTW, I think you wanted a closing > at the end)

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2016-04-06 16:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 16:12 git interpret-trailers with multiple keys Michael S. Tsirkin
2016-04-06 16:58 ` Matthieu Moy [this message]
2016-04-06 17:16   ` Michael S. Tsirkin
2016-04-06 17:42     ` Junio C Hamano
2016-04-06 19:30       ` Michael S. Tsirkin
2016-04-07  2:28         ` Christian Couder
2016-04-10 15:32           ` Michael S. Tsirkin
2016-04-10 16:57             ` Christian Couder
2016-04-10 17:06               ` Michael S. Tsirkin
2016-04-10 17:43               ` Michael S. Tsirkin
2016-04-11  7:09                 ` Matthieu Moy
2016-04-11  7:24                   ` Michael S. Tsirkin

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=vpqlh4qbrnt.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp$(echo .)fr \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=mst@redhat$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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