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

Re: [PATCH] format-patch: print in-body "From" only when needed

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 20, 2013, 18:17 UTC
Message-ID
<xmqq61tvqrw6.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20130920101626.GA21684@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 14 quoted lines
> Commit a908047 taught format-patch the "--from" option,
> which places the author ident into an in-body from header,
> and uses the committer ident in the rfc822 from header.  The
> documentation claims that it will omit the in-body header
> when it is the same as the rfc822 header, but the code never
> implemented that behavior.
>
> This patch completes the feature by comparing the two idents
> and doing nothing when they are the same (this is the same
> as simply omitting the in-body header, as the two are by
> definition indistinguishable in this case). This makes it
> reasonable to turn on "--from" all the time (if it matches
> your particular workflow), rather than only using it when
> exporting other people's patches.

This fix makes 100% sense to me under the assumption that the "--from" option is a good idea, but then it makes me wonder why we need the option in the first place. What would break if we made pp->from_ident default to the value of GIT_COMMITTER_IDENT?

Previous: Jeff KingNext: Jeff King
Message 2 of 4 in “format-patch: print in-body "From" only when needed”
  1. format-patch: print in-body "From" only when neededJeff King, Sep 20, 2013
  2. Junio C HamanoSep 20, 2013
  3. Jeff KingSep 20, 2013
  4. Junio C HamanoSep 20, 2013

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.