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

Re: git-am failed, what's next ?

From
APAndy Parkins <andyparkins@gmail.com>
Date
Feb 22, 2007, 11:13 UTC
Message-ID
<200702221113.44338.andyparkins@gmail.com>
In-Reply-To
<7v8xeqh6bj.fsf@assigned-by-dhcp.cox.net>
On Thursday 2007 February 22 09:47, Junio C Hamano wrote:
Show 9 quoted lines
> If you have the pre-image blobs the patch was created against,
> and the patch was created with git and records "index" lines
> like these correctly:
>
>         diff --git a/builtin-config.c b/builtin-config.c
>         index 0f9051d..f1433a4 100644
>
> then you can tell git to fall back on 3-way merge to apply the
> patch.  After seeing "git am ./mbox" fail, you could try

Magic. I had no idea about this. Could it be made even more magical by doing this for you?

git-am would know if the patch that failed is a git-generated patch, so when things go wrong, before bombing out it could try a 3-way merge. It's much easier to resolve faults with the usual conflict markers than reading patches. It's also possible that the 3-way merge will succeed and git-am will continue without ever needing to worry the user.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Previous: Francis MoreauNext: Junio C Hamano
Message 8 of 10 in “git-am failed, what's next ?”
  1. Francis MoreauFeb 22, 2007
  2. Andy ParkinsFeb 22, 2007
  3. Francis MoreauFeb 22, 2007
  4. Junio C HamanoFeb 22, 2007
  5. Francis MoreauFeb 22, 2007
  6. Junio C HamanoFeb 22, 2007
  7. Francis MoreauFeb 22, 2007
  8. Andy ParkinsFeb 22, 2007
  9. Junio C HamanoFeb 22, 2007
  10. Johannes SchindelinFeb 22, 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.