git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Christian Couder <christian.couder@gmail.com>,
	Paolo Bonzini <bonzini@gnu.org>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH 0/3] interpret-trailers: add --where, --if-exists, --if-missing
Date: Wed, 12 Jul 2017 17:02:33 +0200	[thread overview]
Message-ID: <3be619bd-9018-f328-7cbe-1dd8c93b8d19@redhat.com> (raw)
In-Reply-To: <CAP8UFD0bwb+Zeqn8Xg24J_Z639NiT3Awjzstk6o_L-Q+Wh+c0g@mail.gmail.com>

On 12/07/2017 16:47, Christian Couder wrote:
> On Wed, Jul 12, 2017 at 3:46 PM, Paolo Bonzini <bonzini@gnu.org> wrote:
>>
>> These options are useful to experiment with "git interpret-trailers"
>> without having to tinker with .gitconfig.  It can also be useful in the
>> oddball case where you want a different placement for the trailer.
>>
>> The case that stimulated the creation of the patches was configuring
>>
>>      trailer.signed-off-by.where = end
>>
>> and then wanting "--where before" when a patch author forgets his
>> Signed-off-by and provides it in a separate email.
> 
> Maybe you could have used the following to temporarily override the config:
> 
> git -c trailer.signed-off-by.where=before interpret-trailers ...
> 
> But it could be helpful and more straightforward to provide the
> options you implemented.

That works indeed---and I have now learnt that $GIT_CONFIG_PARAMETERS
makes "git -c" work across my thick layers of aliases!  The main
disadvantage is that it is harder to discover than a command-line option.

Also, I have scripts which pass the --trailer argument is passed
unmodified to "git interpret-trailers", and the command-line argument
avoids the need to parse the trailer to figure out the -c option.  In
particular, in my case the separator is always ":", but in general that
may not be the case.

> I am not sure also if --where should override both "trailer.where" and
> "trailer.<token>.where", or if should just override the former.

I think it should override both, otherwise you have different behavior
depending on whether trailer.<token>.where is defined or not.

Paolo

      reply	other threads:[~2017-07-12 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 13:46 [PATCH 0/3] interpret-trailers: add --where, --if-exists, --if-missing Paolo Bonzini
2017-07-12 13:46 ` [PATCH 1/3] trailers: create struct trailer_opts Paolo Bonzini
2017-07-12 21:19   ` Jonathan Tan
2017-07-12 13:46 ` [PATCH 2/3] trailers: export action enums and corresponding lookup functions Paolo Bonzini
2017-07-12 21:13   ` Jonathan Tan
2017-07-12 13:46 ` [PATCH 3/3] interpret-trailers: add options for actions Paolo Bonzini
2017-07-12 21:10   ` Jonathan Tan
2017-07-12 21:33     ` Paolo Bonzini
2017-07-12 14:47 ` [PATCH 0/3] interpret-trailers: add --where, --if-exists, --if-missing Christian Couder
2017-07-12 15:02   ` Paolo Bonzini [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3be619bd-9018-f328-7cbe-1dd8c93b8d19@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bonzini@gnu.org \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).