From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS54825 147.75.192.0/21 X-Spam-Status: No, score=-3.3 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 72D6B1F405 for ; Tue, 6 Feb 2024 21:12:28 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.a=rsa-sha256 header.s=sasl header.b=sphmtSTj; dkim-atps=neutral Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 65A191C21F05 for ; Tue, 6 Feb 2024 21:12:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 388631B951; Tue, 6 Feb 2024 21:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b="sphmtSTj" Received: from pb-smtp2.pobox.com (pb-smtp2.pobox.com [64.147.108.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E4931B949 for ; Tue, 6 Feb 2024 21:12:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=64.147.108.71 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707253940; cv=none; b=a0gR6BTekLzBCPxuOKHyZwByg4S5kA4r/2HoRum6KCqFONVdpsHfbr3KrhvGPl5wWX0UUVNeeVPPBPn5Vv73D+HGSmcCVRUaCXb+s/c6456PdBLbK/QVvRAuMssqxk8Ajn0rCz9/YwZF3t6yHiqgdb6lv5Dz32g72SNeIkGvBXA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707253940; c=relaxed/simple; bh=THVWepmIL1PfRpwWlKGfwv/As4hSm5g2vvdNc+MVGP0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=nZEvanOC6FmwVvgN68leIoTDxEsjqDfQBEprZVOhZZv6XbEYowfN1mZ8z9epEJ+GvJA/UtLntvPjGZi22TtDNfYkfvd65aEDy4136jBojOBKiYWx5+iaU7c6LC2NrgAvm0+FyD8PRnqu6wvWpiuswEXQy3y05o+LG0Cq3hbXm1g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com; spf=pass smtp.mailfrom=pobox.com; dkim=pass (1024-bit key) header.d=pobox.com header.i=@pobox.com header.b=sphmtSTj; arc=none smtp.client-ip=64.147.108.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=pobox.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pobox.com Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id A286F1CE3BE; Tue, 6 Feb 2024 16:12:17 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type; s=sasl; bh=THVWepmIL1PfRpwWlKGfwv/As4hSm5g2vvdNc+ MVGP0=; b=sphmtSTjf1+u1C4MZ9RYS61lPZi/2ZBTfM6xxDlPO2t/xAI0WKcmM6 ETCIemR8DztiM/LP9dF1d1a8lX+thVikLObcxr821X0lc9g07sSXmcUGSadCy0oW CPRzJmVw2XIUD6RcaS0KgRPzho3snwCpbKjl6+QOAlS931fNauTUA= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 9AE211CE3BD; Tue, 6 Feb 2024 16:12:17 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.125.165.85]) (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 F3E6E1CE3BC; Tue, 6 Feb 2024 16:12:16 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Johannes Schindelin via GitGitGadget" Cc: git@vger.kernel.org, Johannes Schindelin Subject: Re: [PATCH 0/4] merge-tree: handle missing objects correctly In-Reply-To: (Johannes Schindelin via GitGitGadget's message of "Tue, 06 Feb 2024 09:49:37 +0000") References: Date: Tue, 06 Feb 2024 13:12:15 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 68136328-C534-11EE-9B50-25B3960A682E-77302942!pb-smtp2.pobox.com "Johannes Schindelin via GitGitGadget" writes: > I recently looked into issues where git merge-tree calls returned bogus data > (in one instance returning an empty tree for non-empty merge parents). By > the time I had a look at the corresponding repository, the issue was no > longer reproducible, but a closer look at the code combined with some manual > experimenting turned up the fact that missing tree objects aren't handled as > errors by git merge-tree. > > While at it, I added a commit on top that tries to catch all remaining > unchecked parse_tree() calls. > > This patch series is based on js/merge-tree-3-trees because I introduced > three unchecked parse_tree() calls in that topic branch. Thanks. All the added checks looked reasonable to me. Will queue. > > Johannes Schindelin (4): > merge-tree: fail with a non-zero exit code on missing tree objects > merge-ort: do check `parse_tree()`'s return value > t4301: verify that merge-tree fails on missing blob objects > Always check `parse_tree*()`'s return value > > builtin/checkout.c | 19 ++++++++++++++++--- > builtin/clone.c | 3 ++- > builtin/commit.c | 3 ++- > builtin/merge-tree.c | 6 ++++++ > builtin/read-tree.c | 3 ++- > builtin/reset.c | 4 ++++ > cache-tree.c | 4 ++-- > merge-ort.c | 16 +++++++++++----- > merge-recursive.c | 3 ++- > merge.c | 5 ++++- > reset.c | 5 +++++ > sequencer.c | 4 ++++ > t/t4301-merge-tree-write-tree.sh | 24 ++++++++++++++++++++++++ > 13 files changed, 84 insertions(+), 15 deletions(-) > > > base-commit: 5f43cf5b2e4b68386d3774bce880b0f74d801635 > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1651%2Fdscho%2Fmerge-tree-and-missing-objects-v1 > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1651/dscho/merge-tree-and-missing-objects-v1 > Pull-Request: https://github.com/gitgitgadget/git/pull/1651