{"thread":{"id":"31589","subject":"Confused by git am error message.","startedAt":"2012-09-18T21:51:39Z","lastAt":"2012-09-18T22:51:37Z","messageCount":2,"participants":["Philip Oakley","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"199416","messageId":"747F66C694C844EAA56F4BB62C405F78@PhilipOakley","threadId":"31589","inReplyTo":null,"subject":"Confused by git am error message.","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":"2012-09-18T21:51:39Z","receivedAt":"2012-09-18T21:51:39Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"[a user confusion report]\nI was updating my patch series manually aand made a mistake, so the \nseries didn't apply properly. However the error message confused me.\n\n    ...\n    Applying: Doc clean: add See Also links\n    fatal: corrupt patch at line 17\n    Patch failed at 0008 Doc clean: add See Also links\n    When you have resolved this problem run \"git am --resolved\".\n    ...\n\nIn my case I resolved the _patch_ error, and then expected that doing \nthe 'git am --resolved' would try to re-apply the patch and continue \nhappily - I had checked that the status was clean - but it didn't.\n\n    Philip@PHILIPOAKLEY /c/msysgit179/git (nextDoc|AM)\n    $ git am --resolved\n    Applying: Doc clean: add See Also links\n    No changes - did you forget to use 'git add'?\n    If there is nothing left to stage, chances are that something else\n    already introduced the same changes; you might want to skip this \npatch.\n\nI'm not quite sure what the 'right' answer should be, maybe a --reapply \noption, or slightly different words in the message to highlight that the \nuser is to make their worktree/index look like the patch _had_ applied, \nor something else?\n\nPhilip\n"},{"id":"199420","messageId":"7vr4pzj66e.fsf@alter.siamese.dyndns.org","threadId":"31589","inReplyTo":"747F66C694C844EAA56F4BB62C405F78@PhilipOakley","subject":"Re: Confused by git am error message.","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-18T22:51:37Z","receivedAt":"2012-09-18T22:51:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Philip Oakley\" <philipoakley@iee.org> writes:\n\n> [a user confusion report]\n> I was updating my patch series manually aand made a mistake, so the\n> series didn't apply properly. However the error message confused me.\n>\n>    ...\n>    Applying: Doc clean: add See Also links\n>    fatal: corrupt patch at line 17\n>    Patch failed at 0008 Doc clean: add See Also links\n>    When you have resolved this problem run \"git am --resolved\".\n>    ...\n>\n> In my case I resolved the _patch_ error, and then expected that doing\n> the 'git am --resolved' would try to re-apply the patch and continue\n> happily - I had checked that the status was clean - but it didn't.\n\nI recall we went back and forth before settling to the current\nwording.  The \"have resolved this problem\" in that sentence wants to\nsay \"The underlying 'apply --index' did not manage to update the\nworking tree and the index to the state a perfect patch would have\nupdated, so please help me by doing so yourself\".\n\nWhen it did not apply (i.e. not \"conflicted when run as 'am -3'\"),\nan alternative is to edit $GIT_DIR/rebase-apply/patch to make it\napplicable, and say \"git am\" again _without_ \"--resolved\".  But that\nis not what the message is suggesting.\n"}]}