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

Re: How to resolve git-am conflict (possible bug)

From
Junio C Hamano <junkio@cox.net>
Date
Aug 12, 2006, 01:20 UTC
Message-ID
<7vslk2rbq8.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<ebj7er$64j$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
> Third, I wonder why it printed the same error message _twice_.

Do you have blob 7ea52b1? Otherwise you would not see two "does not apply" messages, so I suspect you do. Does the patch cleanly apply to that blob?

More likely explanation is that you edited the patch by hand for some reason, and made it inapplicable to the base blob the "index" line records.

The first "patch does not apply" comes from ll. 363 of git-am. After it fails because the patch does not apply to the version of gitweb.perl in your index, since you told it to fall back to three-way merge, l. 391 calls fall_back_3way, which inspects the patch, finds the "index" line and notices that the patch claims to apply to blob 7ea52b1, finds the blob in your repository, and prepares a temporary index with "update-index -z --index-info" on l. 58 successfully, tries to apply the patch again on l. 63.

However, the patch contents and the blob object name recorded on the index line are not necessarily consistent if you hand edited the patch (IOW, the context lines in the patch contents may not match blob 7ea52b1).

Previous: Junio C HamanoNext: Jakub Narebski
Message 3 of 8 in “How to resolve git-am conflict (possible bug)”
  1. Jakub NarebskiAug 12, 2006
  2. Junio C HamanoAug 12, 2006
  3. Junio C HamanoAug 12, 2006
  4. Jakub NarebskiAug 12, 2006
  5. Jakub NarebskiAug 12, 2006
  6. Junio C HamanoAug 12, 2006
  7. Johannes SchindelinAug 12, 2006
  8. Junio C HamanoAug 12, 2006

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.