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
Michael J Gruber <git@drmicha.warpmail.net>
Date
Aug 27, 2011, 20:35 UTC
Message-ID
<4E595521.7080208@drmicha.warpmail.net>
In-Reply-To
<7vippiaduw.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 27.08.2011 20:46:
Show 23 quoted lines
> Michael Haggerty <mhagger@alum.mit.edu> writes:
> 
>> 1. The extra information typed into the email series is not archived in
>> the git repository, and therefore the emails have to be kept around.
> 
> The convention is to have information that is not meant to be kept around
> after '---', so...
> 
>> 2. If it is discovered between "git format-patch" and "git send-email"
>> that one of the patches needs a tweak, then the email series has to be
>> generated anew and all of the hand-edits need to be redone.
> 
> I actually often work this backwards. Tweak the patch files, apply them to
> commit that they are meant to be applied, retest and then finally send.
> There is no "generating anew" involved.
> 
>> 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.
Don't forget the MJ ;)
My current setup is:

A. I put the additional per commit info in notes. "git format-patch --notes" takes it from there and adds it where it belongs.

B. I put series title and cover letter text into a ref note. "git branch --notes" displays them as a branch note, and "git format-patch --cover --notes" fills in the cover letter for me.

A patch for A has been on the list, but Junio didn't like the additional "---" which I had for technical reasons, and I haven't had time to revisit that patch yet. (The code would have to store a flag about notes having been inserted or not.) Nobody has complained about the patches I've created with that form, though ;)

The stuff for B is part of my "ref notes" stuff which I haven't submitted so far. I've been using it for quite a while now, but am still unsure about some design aspects.

A is simply my branch "format-patch-notes".

B uses these: vob/virtual-objects vob/refrev-hash vob/branch-notes vob/format-patch-branch-note (Merge in this order. Last one is the most immature.)

Note that I rebase frequently these days because of overlapping work in these areas.

I think Jeff had an interesting patch allowing to edit the note along side (OK: at the bottom of) the commit message.

Cheers, Michael

Oh, repo, yes... Any of these:

git://github.com/gitigit/git.git git://gitorious.org/~mjg/git/mjg.git git://repo.or.cz/git/mjg.git

Previous: Junio C HamanoNext: Michael Haggerty
Message 3 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.