From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (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 D8EDA39DBE0 for ; Tue, 7 Jul 2026 06:25:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783405543; cv=none; b=U+EIn5hW3Z6fiyBPCa/yB8o3UkdB77ZMd1859IkhiMq5y75jw0N+7tnKqyRGV5lbI6gLiCkPox8VYFfKWAj2I9xPitcTeVf4US/GCdNkDiB3hRDQGFsrYrI/zqKyu9hAnDdEis5I0U7zpnpiWNsb/js9vkQJnrgvEVmAOkpmkzc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783405543; c=relaxed/simple; bh=NEBqvoKPVMCjv8SUz1NWz6EiGjW3Ww4ljgwLK5y/et0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ovp77y8oTiSKXeFCnLwhyoUgThj7OczC80YmitCjCZSB+06+HPyBiPFbd1iuSxWBZU4BCVg069ZrWKn4KEkizJKzSvFy+yw8TVxxx/PaQ12tug6JRH0Y7t/JUDz38av+6wiYyiPKz/gLES40ipYRnSXrY4IsdwstLzHYh3gxMNs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=PzuaxcEu; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=gcdm3FK6; arc=none smtp.client-ip=202.12.124.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="PzuaxcEu"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="gcdm3FK6" Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfhigh.stl.internal (Postfix) with ESMTP id 014417A001F; Tue, 7 Jul 2026 02:25:40 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Tue, 07 Jul 2026 02:25:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; 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=fm2; t=1783405540; x=1783491940; bh=/FMdy4HkKZ qqlJzxaKKgKQLtHVk/KzVCxVrOYKDj04w=; b=PzuaxcEuvZGCyhKz7TvD1mP+9i Rp/IVEGMdnIisj+t0ThfdYC/rPQ09E9BmhWLqpOsgOC7LPUaVeqeXlq7EMQ7LOxm lgMPCSxUDN477lLe3aQrlbSqt/6JfAyC8o/rLSJ+0PIDcb7k1DZCG1GnrXNWGZjM ndcUtS923N4Xr1xVvmjSCxFP8JKKL4+GY8YPJ19EEl/LVKn6qA2YTNlIEqu3YpBP YNTtTw7slEJZIbmKH30cEArTcEgVAB+D7Oykzf56N4HVarkJUf21n4QGFdBsvk6T YsK36ENSuFmhwPJ+yZ7Xh+qlbVDf8/F/zK2HXK49+DT3S1e+HAGahI2/iGVw== 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= 1783405540; x=1783491940; bh=/FMdy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SCiMIOaE2I9Fj8aUtQqONQsp5wqQBd96bboYIQ6wq3XdNoAA X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jul 2026 02:25:39 -0400 (EDT) Received: by mail (OpenSMTPD) with ESMTPSA id 9c5ca83a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 7 Jul 2026 06:25:37 +0000 (UTC) Date: Tue, 7 Jul 2026 08:25:34 +0200 From: Patrick Steinhardt To: Justin Tobler Cc: git@vger.kernel.org Subject: Re: [PATCH 02/13] setup: mark bogus worktree in `apply_repository_format()` Message-ID: References: <20260630-pks-setup-split-discovery-and-setup-v1-0-13864eb5a032@pks.im> <20260630-pks-setup-split-discovery-and-setup-v1-2-13864eb5a032@pks.im> Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jul 06, 2026 at 04:49:41PM -0500, Justin Tobler wrote: > On 26/06/30 01:47PM, Patrick Steinhardt wrote: [snip] > > Note that this change requires us to also explicitly unset the value of > > "core.worktree" in case we have the "GIT_WORK_TREE" environment variable > > set. This is because the environment variable overrides the repository's > > configuration, and we don't want to warn or die in case the work tree > > has been configured explicitly regardless of whether or not "core.bare" > > is set. > > Hmmm, does this mean we now just silently ignore the misconfiguration if > done via environment variable? We do, but we also ignored those cases before. So the behaviour with and without this change is (supposed) to be the exact same. > > diff --git a/setup.c b/setup.c > > index 118416e350..f54eac5e5a 100644 > > --- a/setup.c > > +++ b/setup.c > > @@ -1768,6 +1767,12 @@ int apply_repository_format(struct repository *repo, > > if (verify_repository_format(format, err) < 0) > > return -1; > > > > + if (format->is_bare > 0 && format->work_tree) { > > + /* #22.2, #30 */ > > + warning("core.bare and core.worktree do not make sense"); > > + repo->worktree_config_is_bogus = true; > > + } > > We now perform this validation in `apply_repository_format()`. Does > deferring this check have any meaningful impact? Or is > `apply_repository_format()` always called after > `setup_explicit_git_dir()`? No, it shouldn't have an impact on any user-visible behaviour. We always call `apply_repository_format()` eventually, as that function is what does the final setup of our repository. Patrick