git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Michael Hendricks <michael@ndrix.org>
Date
Mar 26, 2009, 16:42 UTC
Message-ID
<20090326164212.GF29569@ginosko.ndrix.org>
In-Reply-To
<7v3ad11kqh.fsf@gitster.siamese.dyndns.org>
On Wed, Mar 25, 2009 at 12:11:02PM -0700, Junio C Hamano wrote:
Show 23 quoted lines
> 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.

In all the cases where I use custom headers on patch emails, I want the command line headers to be cumulative with the config headers. I only configure headers which are constant (such as "X-Project: project-name"). The ones that vary have no reasonable default value since they typically represent a bug tracking number or something similar.

Perhaps --add-header is a better name for this argument. That name at least makes it clear that headers specified on the command line are cumulative. If someone has a use case for --no-extra-headers, they can add it later and --add-header retains the same meaning.

Follow-up patch coming shortly.
-- 
Michael
Previous: Junio C HamanoNext: Michael Hendricks
Message 3 of 5 in “format-patch: add arbitrary email headers”
  1. format-patch: add arbitrary email headersMichael Hendricks, Mar 25, 2009
  2. Junio C HamanoMar 25, 2009
  3. Michael HendricksMar 26, 2009
  4. format-patch: add arbitrary email headersMichael Hendricks, Mar 26, 2009
  5. Junio C HamanoMar 26, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.