Re: [PATCH] format-patch: add arbitrary email headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Hendricks <michael@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux