Subject: Re: [PATCH] git-apply: fix --3way with binary patch

From: Junio C Hamano <[email-masked]>
Date: Wed, 28 Jul 2021 14:01:44 -0700

Jerry Zhang <[email-masked]> writes:

> Well it isn't really failing right? Failing 3way would be not finding
> the object ids in the database, which would indicate a failure to
> even attempt 3way. This would result in fallback to direct application.
> What we're seeing is that 3way application results in conflicts where
> direct application would not result in conflicts. Having a conflict is
> currently not a reason for the code to fall back to direct application,
> here is the relevant line:
> "
>          try_threeway(state, &image, patch, st, ce) < 0) {
> "
> try_threeway returns 1 in case of conflict, 0 for success, and -1
> for true errors.

Yup, I know.  That is why I questioned if this "< 0" is a bug in my
earlier message in this exchange.

Thanks.