git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Hendricks <michael@ndrix.org>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] format-patch: add arbitrary email headers
Date: Wed, 25 Mar 2009 12:11:02 -0700	[thread overview]
Message-ID: <7v3ad11kqh.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1237996712-61859-1-git-send-email-michael@ndrix.org> (Michael Hendricks's message of "Wed, 25 Mar 2009 09:58:32 -0600")

Michael Hendricks <michael@ndrix.org> writes:

> format-patch supports the format.headers configuration for adding
> arbitrary email headers to the patches it outputs.  This patch adds
> support for a --header argument which makes the same feature available
> from the command line.  This is useful when the content of custom
> email headers must change from branch to branch.

How should this interact with the configuration variable?

Typically we allow command line options to override the matching config
variable, so that people can say "here are the settings I ordinarily use"
in the config file, and say "but I do not want the usual values to take
effect for this particular invocation; please use these _instead_" with
command line options.

Note that the above question is "how should this interact"; not "how does
this interact".  I can see you chose to make this cumulative in your patch
and the documentaiton.

I am asking if that is what the users want, overriding is preferred, or
perhaps another option to clear extra headers (say, "--no-extra-headers")
is necessary to allow both.

> diff --git a/builtin-log.c b/builtin-log.c
> index c7a5772..35701a7 100644
> --- a/builtin-log.c
> +++ b/builtin-log.c
> @@ -918,6 +918,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
>  			cover_letter = 1;
>  		else if (!strcmp(argv[i], "--no-binary"))
>  			no_binary_diff = 1;
> +		else if (!prefixcmp(argv[i], "--header="))
> +			add_header( argv[i] + 9 );

No extra SP immediately after ( and before ), please.

  reply	other threads:[~2009-03-25 19:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25 15:58 [PATCH] format-patch: add arbitrary email headers Michael Hendricks
2009-03-25 19:11 ` Junio C Hamano [this message]
2009-03-26 16:42   ` Michael Hendricks
2009-03-26 16:51     ` Michael Hendricks
2009-03-26 20:29     ` Junio C Hamano

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=7v3ad11kqh.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=michael@ndrix.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.
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).