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=-2.8 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.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id CA9121F54E for ; Tue, 9 Aug 2022 16:55:22 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="Fmiwbyly"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245146AbiHIQzL (ORCPT ); Tue, 9 Aug 2022 12:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245140AbiHIQzI (ORCPT ); Tue, 9 Aug 2022 12:55:08 -0400 Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 043FC22B17 for ; Tue, 9 Aug 2022 09:55:06 -0700 (PDT) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id D2E6214701E; Tue, 9 Aug 2022 12:55:05 -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=daQauTlG5sIpDpguMbDbJYU3IxsXuKxtTC3Soq pjbbU=; b=FmiwbylycPqHZXgwnsmya4ePYzHwe3/62ezrvHKjYFmV2EZL9dUkAc aOmpL4/uERLLTmZcSYHEkc61i0hr4SGlcyuUo1VA4ofK3FU+ZkCJ52pboFFYSi1F 09hJhm1Jq5hJfRC2PRYhoO+VD9VbwbmYg+UCxGRrKRZBnSiSgNB60= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 7DB3614701C; Tue, 9 Aug 2022 12:55:05 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.145.39.32]) (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 8763514701A; Tue, 9 Aug 2022 12:55:04 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jeff King Cc: Derrick Stolee , =?utf-8?B?w4Z2YXIgQXJuZmo=?= =?utf-8?B?w7Zyw7A=?= Bjarmason , git@vger.kernel.org, Emily Noneman , Paul Horn Subject: Re: [PATCH] revision.c: set-up "index_state.repo", don't segfault in pack-objects References: Date: Tue, 09 Aug 2022 09:55:03 -0700 In-Reply-To: (Jeff King's message of "Tue, 9 Aug 2022 08:54:32 -0400") 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: 0414B572-1804-11ED-93E9-5E84C8D8090B-77302942!pb-smtp1.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Jeff King writes: > Here's the test addition you mentioned, though I'm really not sure it's > adding much. The source lines for both the bug/fix and the spot where we > segfault should be identical between the two cases. It's really just > about how we ended up calling into the code. True, but the "non-existing index file" case is rare enough that it would be worth to document the new way to get into the state, I would think. I am offline every other Tuesday and today is such a day, so please expect no changes to the public repositories. Thanks. > t/t7063-status-untracked-cache.sh | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/t/t7063-status-untracked-cache.sh b/t/t7063-status-untracked-cache.sh > index c1f0d95036..a0e8920ffa 100755 > --- a/t/t7063-status-untracked-cache.sh > +++ b/t/t7063-status-untracked-cache.sh > @@ -990,4 +990,9 @@ test_expect_success 'empty repo (no index) and core.untrackedCache' ' > git -C emptyrepo -c core.untrackedCache=true write-tree > ' > > +test_expect_success 'empty worktree and core.untrackedCache' ' > + git worktree add --no-checkout empty-worktree && > + git -c core.untrackedCache=true gc > +' > + > test_done