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

Re: Idea: "git format-patch" should get more information out of git

From
Jeff King <peff@peff.net>
Date
Aug 29, 2011, 18:55 UTC
Message-ID
<20110829185546.GD756@sigill.intra.peff.net>
In-Reply-To
<7v1uw69h96.fsf@alter.siamese.dyndns.org>
On Sat, Aug 27, 2011 at 11:34:13PM -0700, Junio C Hamano wrote:
Show 16 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> 
> > Michael Haggerty <mhagger@alum.mit.edu> writes:
> >
> >> 4. There is no place to store the "additional information" (the part
> >> that comes in patch emails between the "---" and the diffstat) while
> >> working on the patch series;...
> >
> > I thought there was a RFC floating around to do this using notes and also
> > teach it to "commit -e" a few months ago? I vaguelly recall that Peff and
> > one of the J's were involved, so I am CC'ing them.
> 
> Also, when I prepare a commit to be sent with an additional piece of
> information, I often write "---" and the additional message after my
> S-o-b: line while preparing the commit log message. Unlike format-patch
> that strips that off, commit keeps it, which is handy.

After playing around a bit with my earlier series, I made the realization (perhaps obvious to others :) ), that if you are in a pure-patch workflow, keeping the "---" in your commit message locally is much simpler. It follows the commit around through rebases automatically, it gets put into format-patch output automatically, and so forth.

The only real downside is that you can never tell git "don't show me the cover letter cruft". Which is probably OK for your own local patches. But the point of the "---" is that information should never make it into a repo, which means in any workflow that involves pulling actual git commits, it won't work (after reading Michael's response in another thread, though, I think he would be interested in a hybrid pull-or-apply-via-mail system).

-Peff
Previous: Junio C HamanoNext: Michael J Gruber
Message 6 of 12 in “Idea: "git format-patch" should get more information out of git”
  1. Michael HaggertyAug 27, 2011
  2. Junio C HamanoAug 27, 2011
  3. Michael J GruberAug 27, 2011
  4. Michael HaggertyAug 28, 2011
  5. Junio C HamanoAug 28, 2011
  6. Jeff KingAug 29, 2011
  7. Michael J GruberAug 30, 2011
  8. Jeff KingAug 30, 2011
  9. Michael J GruberAug 30, 2011
  10. Johan HerlandAug 30, 2011
  11. Michael HaggertySep 1, 2011
  12. Michael J GruberSep 1, 2011

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.