From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a5-smtp.messagingengine.com (fout-a5-smtp.messagingengine.com [103.168.172.148]) (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 1587C329396 for ; Thu, 16 Jul 2026 15:28:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.148 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784215737; cv=none; b=ntpqAxOGTpedbOgxJ3gvfZjAr6qbgd1gVockef+ABP1QhQlaVxN925D1utORQZjxldO5+3PNIAyjSe8yg77iV4B43wRAHGw0+FI1grAh9qjJGlCoSLdemZQ+qIWES5tJVSifZ1786dngF045kJhpLYMN8nBOAktIUKYrvqoHcI0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784215737; c=relaxed/simple; bh=a9pkfb3DA57Zh9J+5iMs2i8TUQIFsCUTE56bkd9hw6A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=PCtvKx7ERvJVGoTMQVKC8dsJ5XGgQnMDldT0ugUKfg2U0Tx7P/O7CJDda2BidLnPvroGOMMEOQSyf71SYjT0kGG3RpJoBv/q1yAvLzTBoR9qM09k9kPSmhxVpCCyRBHNUIg1gLb3R3P9ca8WhMd4CC1l5HthZZOUsL+VvbKhLOs= 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 (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b=VdwbfRac; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=j4bxPwIt; arc=none smtp.client-ip=103.168.172.148 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pobox.com header.i=@pobox.com header.b="VdwbfRac"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="j4bxPwIt" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 25180EC0190; Thu, 16 Jul 2026 11:28:55 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-06.internal (MEProxy); Thu, 16 Jul 2026 11:28:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1784215735; x=1784302135; bh=oDK9Kv5T8a MrNtlkCIddIpQsDe5wY8Gqj6LaIMDXILM=; b=VdwbfRaccYsxsZnMecASFc9OID 5j8L8MEZ7+4AekkqLnn0nrP5HWxEkuSRBPkR6CrQ5cLhQVguODDzZ3RUuC3hRn6+ I1ZSb9cdrZezJBKsUu41n/per5rbzDYuPLIFRBy9WPsSTuRIFNkwigrNJR+EA2y0 FY8+vlbPBdGCobQTTedbAi2kPh0wJZupjDKZcvfab08iikItFfc8gp8gS75kTPak 9J1d0UKaXJGWULDFL4ohNJymYYdqn7lZkgoQaBLiGUC67l2mgB7XmREa6ECUS2Rs czjJpIr1iLg87oeVYVH3R4GTCjAhoFRtL38QJDSJLPiqoLXKgRYX9zUd3k5A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1784215735; x=1784302135; bh=oDK9Kv5T8aMrNtlkCIddIpQsDe5wY8Gq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X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Jul 2026 11:28:54 -0400 (EDT) From: Junio C Hamano To: Patrick Steinhardt Cc: Tian Yuchen , git@vger.kernel.org, five231003@gmail.com, hariom18599@gmail.com, Christian Couder , Ayush Chandekar , Olamide Caleb Bello Subject: Re: [PATCH v1] repository: move fetch_if_missing into struct repository In-Reply-To: (Patrick Steinhardt's message of "Wed, 15 Jul 2026 08:35:46 +0200") References: <20260715011850.3181131-1-cat@malon.dev> Date: Thu, 16 Jul 2026 08:28:53 -0700 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 Patrick Steinhardt writes: >> /* >> * index-pack never needs to fetch missing objects except when >> * REF_DELTA bases are missing (which are explicitly handled). It only >> * accesses the repo to do hash collision checks and to check which >> * REF_DELTA bases need to be fetched. >> */ >> - fetch_if_missing = 0; >> - >> - show_usage_if_asked(argc, argv, index_pack_usage); >> + if (repo) >> + repo->fetch_if_missing = 0; >> >> disable_replace_refs(); >> > > Okay. This command can run without a repository, in which case we'll end > up just indexing the pack. My assumption is that we'll probably end up > using `the_repository` if so, as we still use `the_repository` in this > file. So could this here cause a change in behaviour? Meaning that even outside a repository, we could have read the setting from ~/.gitconfig or some other places other than the per-repository .git/config file?