From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 2F49D1F506 for ; Wed, 21 Sep 2022 23:11:48 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="uX6E9Mo2"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229687AbiIUXLN (ORCPT ); Wed, 21 Sep 2022 19:11:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbiIUXLM (ORCPT ); Wed, 21 Sep 2022 19:11:12 -0400 Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93391A6C40 for ; Wed, 21 Sep 2022 16:11:11 -0700 (PDT) Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 8E398153D7F; Wed, 21 Sep 2022 19:11:10 -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=svOESnBhgtbMp6DmHGaqTLlBag+hVFguYL21ly p9NGk=; b=uX6E9Mo2TavssVnCo8fPlYMfY4KET2BWcR1LAHfWMsKrwR8XtP/zDk nHVqG/j8SA1Y1vZANVUz90AKcJ5hNaGBhNM5K9Zj4ev3P8DPGJM3UKwqxwKIBJoJ jdauwnbVGzuNOG9xIhPKg7YyM52azUc2deouldVWRYFwMWQQcc+do= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 86085153D7E; Wed, 21 Sep 2022 19:11:10 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.83.5.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id DEF04153D7D; Wed, 21 Sep 2022 19:11:09 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Elijah Newren Cc: Johannes Schindelin via GitGitGadget , Git Mailing List , Taylor Blau , Johannes Schindelin Subject: Re: [PATCH v2] merge-tree: fix segmentation fault in read-only repositories References: Date: Wed, 21 Sep 2022 16:11:08 -0700 In-Reply-To: (Elijah Newren's message of "Wed, 21 Sep 2022 15:56:37 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: ADD8CB00-3A02-11ED-90D8-307A8E0A682E-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Elijah Newren writes: >> @@ -473,7 +475,7 @@ static int real_merge(struct merge_tree_options *o, >> &result); >> } >> merge_finalize(&opt, &result); >> - return !result.clean; /* result.clean < 0 handled above */ >> + return !result.tree || !result.clean; /* result.clean < 0 handled above */ > > Thinking out loud, should this logic be at the merge-ort.c level, True. > ... However, I do think > merge-ort should be returning a negative value for the "clean" status > in such a case. True, too.