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

Re: [PATCH] git-am: indicate where a failed patch is to be found.

From
Jeff King <peff@peff.net>
Date
Jul 12, 2012, 20:33 UTC
Message-ID
<20120712203339.GB13544@sigill.intra.peff.net>
In-Reply-To
<4FFF1821.7030705@windriver.com>
On Thu, Jul 12, 2012 at 02:32:01PM -0400, Paul Gortmaker wrote:
Show 13 quoted lines
> In case it helps any, a brief summary of my workflow is this:
> 
> git am /tmp/mbox
> <some random fail halfway in the queue>
> patch -p1 --dry-run < .git/rebase-apply/patch
> # gauge status.  Is patch really invalid, or already applied?
> # already applied; "git am --skip"
> # no, if valid, but with minor issues, apply what we can.
> patch -p1 < .git/rebase-apply/patch
> # manually deal with rejects (typically with wiggle)
> git add any_new_files
> git add -u
> git am -r

This does not in any way address your patch, but you may find it helpful. My usual next step after "git am" fails is to run "git am -3" and have it do a 3-way merge. This can sometimes resolve issues entirely, and when conflicts remain, they are placed in the file with the usual conflict markers (and the conflicted files are marked in the index, so you can even use "git mergetool" to help you run an external tool like xxdiff).

-Peff
Previous: Junio C Hamano
Message 16 of 16 in “git-am: indicate where a failed patch is to be found.”
  1. git-am: indicate where a failed patch is to be found.Paul Gortmaker, Jul 12, 2012
  2. Junio C HamanoJul 12, 2012
  3. Paul GortmakerJul 12, 2012
  4. Junio C HamanoJul 12, 2012
  5. Paul GortmakerJul 12, 2012
  6. Junio C HamanoJul 12, 2012
  7. Paul GortmakerJul 13, 2012
  8. Junio C HamanoJul 13, 2012
  9. Junio C HamanoJul 12, 2012
  10. git-am: indicate where a failed patch is to be found.Paul Gortmaker, Jul 13, 2012
  11. Junio C HamanoJul 13, 2012
  12. Paul GortmakerJul 13, 2012
  13. Junio C HamanoJul 13, 2012
  14. Re: git-am: indicate where a failed patch is to be found.Nicolas Sebrecht, Jul 12, 2012
  15. Junio C HamanoJul 12, 2012
  16. Jeff KingJul 12, 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.