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

Confused by git am error message.

From
Philip Oakley <philipoakley@iee.org>
Date
Sep 18, 2012, 21:51 UTC
Message-ID
<747F66C694C844EAA56F4BB62C405F78@PhilipOakley>

[a user confusion report] I was updating my patch series manually aand made a mistake, so the series didn't apply properly. However the error message confused me.

    ...
    Applying: Doc clean: add See Also links
    fatal: corrupt patch at line 17
    Patch failed at 0008 Doc clean: add See Also links
    When you have resolved this problem run "git am --resolved".
    ...

In my case I resolved the _patch_ error, and then expected that doing the 'git am --resolved' would try to re-apply the patch and continue happily - I had checked that the status was clean - but it didn't.

    Philip@PHILIPOAKLEY /c/msysgit179/git (nextDoc|AM)
    $ git am --resolved
    Applying: Doc clean: add See Also links
    No changes - did you forget to use 'git add'?
    If there is nothing left to stage, chances are that something else
    already introduced the same changes; you might want to skip this 
patch.

I'm not quite sure what the 'right' answer should be, maybe a --reapply option, or slightly different words in the message to highlight that the user is to make their worktree/index look like the patch _had_ applied, or something else?

Philip
Next: Junio C Hamano
Message 1 of 2 in “Confused by git am error message.”
  1. Philip OakleySep 18, 2012
  2. Junio C HamanoSep 18, 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.