From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24EE8C4338F for ; Wed, 28 Jul 2021 21:01:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C4646101C for ; Wed, 28 Jul 2021 21:01:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231645AbhG1VBv (ORCPT ); Wed, 28 Jul 2021 17:01:51 -0400 Received: from pb-smtp1.pobox.com ([64.147.108.70]:62569 "EHLO pb-smtp1.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231916AbhG1VBr (ORCPT ); Wed, 28 Jul 2021 17:01:47 -0400 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 8D344E4517; Wed, 28 Jul 2021 17:01:45 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=5cWw81f+ztalXGCR3avQMsGIuZ9eNgZbBxLXFv 2bW8E=; b=EBMBxhJJgW6Ub2VggmWZEWgv0idfLG/chMWMzsebSUcA6ABp7t53PO wc7lfoJZteJXoM6SDkGWcwESpxZFcwteCW5FktzoQFo+saoFaQ1MprC8plfhzG2l ZpLAAVg/zmgGeqzn7snuTOSGfFjyQHa3IEO8TrlWcbqNE28JWQXBo= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 841CAE4516; Wed, 28 Jul 2021 17:01:45 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [35.196.71.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 0365EE4515; Wed, 28 Jul 2021 17:01:44 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jerry Zhang Cc: Git Mailing List , lilinchao@oschina.cn Subject: Re: [PATCH] git-apply: fix --3way with binary patch References: <20210728024434.20230-1-jerry@skydio.com> Date: Wed, 28 Jul 2021 14:01:44 -0700 In-Reply-To: (Jerry Zhang's message of "Wed, 28 Jul 2021 13:37:50 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 041B4450-EFE7-11EB-BDB2-8B3BC6D8090B-77302942!pb-smtp1.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Jerry Zhang 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.