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

Re: [RFC] series headers

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 10, 2007, 06:57 UTC
Message-ID
<7vejjgsq3y.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0707100126250.6977@iabervon.org>
Daniel Barkalow <barkalow@iabervon.org> writes:
> I'd like to be able to get format-patch to produce a [PATCH 0/N] message, 
> with a message that's actually in my repository, plus various goodies 
> generated either from diffing the ends of the series or by running through 
> the log an extra time to pick up summary information.
So far, so good.
Show 6 quoted lines
> As far as implementing this... would it be sane to make struct 
> rev_info.commit_format a callback, so that the code to generate an email 
> message can be somewhere that's easy to use to generate an email that 
> isn't for a commit in the log? I don't *think* git's quite fast enough for 
> the indirect jump to a callback instead of an if tree for an enum will 
> actually hurt us.

I suspect that temptation to touch rev_info.commit_format arises purely because you are thinking about making 0/N a (perhaps fake) commit. I do not see a point in that.

What is the workflow?
 $ work work work, commit commit commit, reorder and perfect
 $ git tag end-of-series
 ... in $EDITOR, edit the [0/N] message
 $ git format-patch origin..end-of-series
 ... which notices end-of-series, and perhaps internally runs
 ... $ git-shortlog origin..end-of-series
 ... $ git diff --stat --summary origin..end-of-series
 ... $ git cat-file tag end-of-series
 ... to create 0/N which it did not do so far in
 ... 0000-cover-letter.txt
 $ git-send-email 0*.txt

Would it be so much better than this workflow which would probably not need to touch much of the 'commit formatting" code that is used for [1/N]..[N/N] messages?

 $ work work work, commit commit commit, reorder and perfect
 $ git format-patch --with-cover origin..HEAD
 ... which notices --with-cover, and perhaps does
 ... $ git-shortlog origin..HEAD
 ... $ git diff --stat --summary origin..HEAD
 ... $ echo "*** BLURB HERE ***"
 ... to create 0/N which it did not do so far in
 ... 0000-cover-letter.txt
 $ $EDITOR 0000-cover-letter.txt
 $ git-send-email 0*.txt
Previous: Daniel BarkalowNext: Theodore Tso
Message 2 of 11 in “[RFC] series headers”
  1. Daniel BarkalowJul 10, 2007
  2. Junio C HamanoJul 10, 2007
  3. Theodore TsoJul 10, 2007
  4. Johannes SchindelinJul 10, 2007
  5. Theodore TsoJul 10, 2007
  6. Johannes SchindelinJul 10, 2007
  7. Teach the --cover-letter option to format-patchJohannes Schindelin, Jul 10, 2007
  8. Daniel BarkalowJul 10, 2007
  9. Johannes SchindelinJul 10, 2007
  10. Peter OberndorferJul 24, 2007
  11. Daniel BarkalowJul 24, 2007

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.