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 2E0981F51E for ; Mon, 26 Sep 2022 22:08:08 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="sig9hvKB"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229659AbiIZWIC (ORCPT ); Mon, 26 Sep 2022 18:08:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbiIZWIC (ORCPT ); Mon, 26 Sep 2022 18:08:02 -0400 Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 549B69FAAC for ; Mon, 26 Sep 2022 15:08:01 -0700 (PDT) Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 1A7C115D3F9; Mon, 26 Sep 2022 18:08:00 -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=lvOVJup+V5wyIPepjyJimoQrcuVMs8y253GZi9 qiYTQ=; b=sig9hvKBQrXago+/9timULxfPSWU9GLut+cMNmiFl45wAJe/H/cKJX tOoeo42rtumlLOQ8z0QmhVvTDeBjC71l6/Smcm8pmuj5bQzq4EOIMhgj1Cl2wAi0 v5bLHSZSGKhYeAQ9B8p6oqUR3U/Ws7QTWS74kZHGkBcaa7lutJMZg= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 0D62515D3F8; Mon, 26 Sep 2022 18:08:00 -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 6AD9515D3F7; Mon, 26 Sep 2022 18:07:59 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Johannes Schindelin via GitGitGadget" Cc: git@vger.kernel.org, Elijah Newren , Taylor Blau , Johannes Schindelin Subject: Re: [PATCH v4 2/2] merge-ort: return early when failing to write a blob References: <087207ae0b0932fcec9aa25e97bbe9227eff81cb.1664229348.git.gitgitgadget@gmail.com> Date: Mon, 26 Sep 2022 15:07:58 -0700 In-Reply-To: <087207ae0b0932fcec9aa25e97bbe9227eff81cb.1664229348.git.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Mon, 26 Sep 2022 21:55:48 +0000") 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: AE9BF24A-3DE7-11ED-B26C-307A8E0A682E-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > In the previous commit, we fixed a segmentation fault when a tree object > could not be written. > > However, before the tree object is written, `merge-ort` wants to write > out a blob object (except in cases where the merge results in a blob > that already exists in the database). And this can fail, too, but we > ignore that write failure so far. Nice find. As long as we create at least one "new" blob the repository has not seen, we have a chance to exit before we attempt to write a tree object (and notice a failure). Checking the return value of process_entry() for failures is a good thing to do. Will replace. Thanks.