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

Bug, feature, or pilot error: format-patch

From
GCGene Czarcinski <gene@czarc.net>
Date
Jan 28, 2013, 17:03 UTC
Message-ID
<5106AF7C.1010502@czarc.net>

I am not on the mailing list so please CC me. I am running git 1.8.1 on Fedora 18.

I aam having what appears to be a problem. Here is the sequence which generally describes what I did and what happened:

     git  checkout  -b  test1  master
     git  am  0001-simple-1.patch
     git  checkout  -b  test2  master
     git  am  0001-simple-2.patch        ### this is known to conflict 
with 0001-simple-1.patch
     git  checkout  test1
     git  merge  test2
[here git-merge detects a conflict]
     git  mergetool                               ###to resolve the conflict
[conflict resolved]
     git  commit  -a -s
     git  log
[shows two commits -- one for simple-2 and one for the merge]
     git  format-patch  master..HEAD
[two patch files created: 0001-simple-1.patch and 0002-simple-2.patch]
[0002-simple-2.patch and 0001-simple-2.patch are exactly equal and do 
not reflect the resolved conflict]

If you do git-diff between <commit-patch-1> and HEAD, you get something different that you got from format-patch.

1. Bug ... format-patch is broken
2. Feature ... that is the way it works
3. Pilot error ... ??
I can create a good version of patch-2 manually but should I have to?

Color me foolish but I assumed I could do git-format-patch in one branch and then use git-am to recreate that branch elsewhere.

Gene
Next: Gene Czarcinski
Message 1 of 2 in “Bug, feature, or pilot error: format-patch”
  1. Gene CzarcinskiJan 28, 2013
  2. Gene CzarcinskiJan 30, 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.