From: Michael S. Tsirkin Date: Wed, 06 Apr 2016 17:16:20 GMT Subject: Re: git interpret-trailers with multiple keys Message-ID: <20160406201509-mutt-send-email-mst@redhat.com> In-Reply-To: On Wed, Apr 06, 2016 at 06:58:30PM +0200, Matthieu Moy wrote: > "Michael S. Tsirkin" writes: > > > I have this in .git/config > > > > [trailer "r"] > > key = Reviewed-by > > command = "echo \"Michael S. Tsirkin > [trailer "s"] > > key = Signed-off-by > > command = "echo \"Michael S. Tsirkin > > > whenever I run git interpret-trailers -t r I see these lines added: > > > > Reviewed-by: Michael S. Tsirkin > Signed-off-by: Michael S. Tsirkin > Reviewed-by: Michael S. Tsirkin > > > Why is Reviewed-by repeated? Bug or feature? > > The first two lines are added unconditionally: > > $ echo | git interpret-trailers > > Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin > 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) Is this worth fixing? It doesn't look like a behaviour anyone would want... > -- > Matthieu Moy > http://www-verimag.imag.fr/~moy/