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

Interesting git-format-patch bug

From
OROlsen, Alan R <alan.r.olsen@intel.com>
Date
Nov 26, 2012, 21:33 UTC
Message-ID
<4B2793BF110AAB47AB0EE7B9089703854CA7BA61@fmsmsx110.amr.corp.intel.com>
I found an interesting bug in git-format-patch.
Say you have a branch A.  You create branch B and add a patch to it. You then merge that patch into branch A. After the merge, some other process (we will call it 'gerrit') uses annotate and changes the comment on the patch that exists on branch B.
Now someone runs git-format-patch for the last n patches on branch A.  You should just get the original patch that was merged over to branch A.  What you get is the patch that was merged to branch A *and* the patch with the modified commit comment on branch B. (Double the patches, double the clean-up...)
This is should be one of those rare corner case "don't do that" occurrences. Unfortunately it does happen once in a while on our branches and it screws up some of the automated processes we rely on.
Is there a way around that (other than "don't") or can this be fixed?
Next: Junio C Hamano
Message 1 of 5 in “Interesting git-format-patch bug”
  1. Olsen, Alan RNov 26, 2012
  2. Junio C HamanoNov 26, 2012
  3. Perry HutchisonNov 27, 2012
  4. Junio C HamanoNov 27, 2012
  5. Olsen, Alan RNov 27, 2012

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.