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

From: Stephen Boyd <[email-masked]>
Date: Wed, 14 Apr 2010 20:28:49 -0700

On 04/14/2010 01:33 PM, Junio C Hamano wrote:
[...]
> 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 <[email-masked]>

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 ;-)