From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) (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 718373546D8 for ; Tue, 7 Jul 2026 19:23:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.159 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783452233; cv=none; b=jVuXTc2xzhP3kPRmbvArujtiDl3f48m7ElK2kditchJQ7NTuNrPqSAu/FziZMVNEUe/00OMNFvau4duIyAtLvDOYzRFZ/ACxmokPMfRZ2dcZ7NmFzHUZ8vo3oc36gHMRGjP5hiXJyHuIR0j/RWvhCP6EsCpkFS/n9XCWsSEiWg4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783452233; c=relaxed/simple; bh=PQC/FtkG/E7NF7RrMeJ4K5Ghivl5LtSU1z1YZzfWJtA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=b0HSdAvh9/xPI0EiBTjIEGXajsYNFZrqW0ZE5fTwpCdGaG1RLXjrIz1woV9vom1D4W+8/KCvcDlXIMHS1IR9JZhJGbEWsWbsU52gOF3Lf9UHh4oCW36K1v7f/xD3ITO9Zjt9vzSI7WsOEJSQjf4iOWhCSyPFhCluVPvCA/DxQn4= 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=dsDgkOg1; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hkrfsvmc; arc=none smtp.client-ip=103.168.172.159 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="dsDgkOg1"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hkrfsvmc" Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id A9B0C14000E1; Tue, 7 Jul 2026 15:23:51 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-04.internal (MEProxy); Tue, 07 Jul 2026 15:23:51 -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=1783452231; x=1783538631; bh=oXL0QMq1j7 1Nf12+aIe58g+Vu+ka6cLPWMvbT8XVYkA=; b=dsDgkOg1M0G8qoMnEItFvQQSPg JWywoge/2pIYuozFDnVxKH2nuPNog/qun1y/qksXyobf0S/oD1v+r+JJtqHKVDeI HAmspYN0fE5Bj7pf87/kv0AlSlJt6s4yPiNGvNznGOPJP2xBggl7hc/c9c3BQ3cS LjVWMHf7+IXqThkr4pKSDSzJtx+d4JlkBQRS923J6/WBGqDaSDUnbvy5NPjQHUyE a8XE8rMHwoNhcNJfjTnyPKpSevO39sx1XW1qaok6MH2a10dsV21NQXRSCkk20Bfk fHBCtY2Z6+kgQmimiPCo0pBRQxtgCXUf0W1gNILlGOxKcpnq7AFoK81OrOog== 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= 1783452231; x=1783538631; bh=oXL0QMq1j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DsfK7YUT/VbFXCRbwc1dfeZbHl+BeWzI4ZLXxSnw X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 Jul 2026 15:23:50 -0400 (EDT) From: Junio C Hamano To: Patrick Steinhardt Cc: Chen Linxuan , git@vger.kernel.org, Kristoffer Haugsbakk , Phillip Wood Subject: Re: [PATCH v6 2/2] config: add "worktree" and "worktree/i" includeIf conditions In-Reply-To: (Patrick Steinhardt's message of "Tue, 7 Jul 2026 17:26:19 +0200") References: <20260703-includeif-worktree-v6-0-a13893ad9a7f@black-desk.cn> <20260703-includeif-worktree-v6-2-a13893ad9a7f@black-desk.cn> Date: Tue, 07 Jul 2026 12:23:49 -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: >> > The last call to git-config(1) fails, which is inconsistent with how >> > resolve the path for "gitdir". >> >> I investigated the symlink mismatch. >> ... >> My current possible v7 approach is to keep `repo->worktree` canonical, >> but store an additional absolute, normalized, non-realpath worktree path >> for `includeIf.worktree`. For the ordinary discovered-repository case, >> this has to be derived in `setup_discovered_git_dir()` from physical >> `cwd`, the worktree-root offset, and a validated `$PWD`, because >> `set_git_work_tree()` is otherwise only called with `"."`. >> >> This makes your suggested test pass, but the plumbing is less trivial >> than the original patch. Does this approach sound reasonable, or would >> you prefer different semantics for symlinked worktree paths? > > It certainly sounds a bit ugly, but I'd rather have something that's > ugly than something that's inconsistent for our users *shrug* OK, so I'd expect v7 to come and then we hopefully can declare victory ;-). Thanks, both.