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

Re: [PATCH] am -3: recover the diagnostic messages for corrupt patches

From
Stephen Boyd <bebarino@gmail.com>
Date
Apr 15, 2010, 03:28 UTC
Message-ID
<4BC687F1.4010608@gmail.com>
In-Reply-To
<7vpr21pyed.fsf@alter.siamese.dyndns.org>

On 04/14/2010 01:33 PM, Junio C Hamano wrote: [...]

Show 7 quoted lines
> We could fix this issue by reverting 3dd170, or keeping the error message
> to somewhere and showing it, but because this is an error codepath, the
> easiest is to disable the optimization.  The second patch application is
> attempted even when the input is corrupt, and it will notice, diagnose,
> and stop with an error message.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Looks fine to me. Two invocations on an error path where user intervention is most likely required shouldn't be too bad like you say.

This reminds me, a while ago I looked into pushing 3way into git-apply (that was a GSoC project suggestion). We could introduce an internal "I'm attempting a 3way if this fails" option for git-apply and then it could be smart and output the errors if the patch is malformed. Otherwise it would be silent like it should be on 3way apply for the first time failures. Obviously this will have to happen for 3way to be pushed into git-apply at all.

Sounds a little too smart to me though (this is the stupid content tracker after all) so let's just do what you have ;-)

Previous: Junio C Hamano
Message 2 of 2 in “am -3: recover the diagnostic messages for corrupt patches”
  1. am -3: recover the diagnostic messages for corrupt patchesJunio C Hamano, Apr 14, 2010
  2. Stephen BoydApr 15, 2010

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.