From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (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 C1D9B46A5E5 for ; Fri, 11 Sep 2026 22:09:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.144 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789164542; cv=none; b=CZjxnBXSAxESJJQMOTgYTDjU3q56mcA5eqxA4nPe6Z4rbnwZJxoITXQIj6An6PguhhsxbOaaxeZWRIjNPD7doQknYFHtIWsgVxjAFtNDKb3/GivFDRyiUdo3FD97auA57qq00OGaBNSuQ3tjnSlkLTNkjg0U+1MbXtYpu31y0JI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789164542; c=relaxed/simple; bh=XQ88bdADAkCJRa5YjAaXV418RkN4bFBDmnmE900srCc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=cV8/+oPda8gtUuGUdflRyjRA2wpS0AlX8mu7j4qsgi8yXfCtR7rw03DGOB1qv6XYUL2UtkxYvqWRsGQhg8qRrlZoS1hiPdAejIl9QDGok1oLMV8Ry3jom1OM492w8ZJDWE0qWDacOW0XjxYN/TENW4xi9taLQ2jqG7In94cTAW8= 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=X4ANovZg; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Z7w5U/Bp; arc=none smtp.client-ip=202.12.124.144 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="X4ANovZg"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Z7w5U/Bp" Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 064251D00036; Fri, 11 Sep 2026 18:09:00 -0400 (EDT) Received: from phl-frontend-01 ([10.202.2.160]) by phl-compute-06.internal (MEProxy); Fri, 11 Sep 2026 18:09:00 -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=fm3; t=1789164539; x=1789250939; bh=xkAqVjdV3t tzxF8QZUwhrOaPv3GG+QIbhvGp8xZQAts=; b=X4ANovZgHAnqW5cOCROs+rSUfF hsxmKCd/X3OcJbyUP+tr22x0AYRnENBYH8iMOAL0ZQ+Gn4akeDSB+0PMdEtoOPjf LLAYQ5evZGnmC6TvXxg/vEZX23+vNibB2osaAvtf9r+Gl9WqZd5KKlBNXprietV2 WW97TOeFp9ZNwtkqEjOiWyFH52KMpmLuQXLtYyWL3tYdChDKsNElsLmPddMTeGDD MYAYhnexHc4055BejM6sG9epwYIPqtZey+HDppKWT0lbMENxR4bjf/mOMyz5mW3G VSXnqBL15LoyjSKZBckgl8hq0DjC7kLURsjfYMv/X8/Yx95Qo6fkDTgKSkVg== 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=fm1; t= 1789164539; x=1789250939; bh=xkAqVjdV3ttzxF8QZUwhrOaPv3GG+QI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qTR+s2OV64fny1qzXxi2uptQ X-ME-Proxy: Feedback-ID: if26b431b:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Sep 2026 18:08:59 -0400 (EDT) From: Junio C Hamano To: K Jayatheerth Cc: git@vger.kernel.org, jltobler@gmail.com, lucasseikioshiro@gmail.com Subject: Re: [GSoC Patch v6 2/7] repo: add path.superproject-root with absolute and relative suffixes In-Reply-To: <20260911144519.1011780-3-jayatheerthkulkarni2005@gmail.com> (K. Jayatheerth's message of "Fri, 11 Sep 2026 20:15:14 +0530") References: <20260716012138.6714-1-jayatheerthkulkarni2005@gmail.com> <20260911144519.1011780-1-jayatheerthkulkarni2005@gmail.com> <20260911144519.1011780-3-jayatheerthkulkarni2005@gmail.com> Date: Fri, 11 Sep 2026 15:08:58 -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 K Jayatheerth writes: > Scripts working in multi-repository setups often need to identify the > top-level working tree of a superproject from within a submodule. > Currently, this is only exposed via `git rev-parse > --show-superproject-working-tree`. > > Introduce `path.superproject-root.absolute` and > `path.superproject-root.relative` keys to `git repo info`. > This exposes the core submodule context via a scriptable config-like key > using standard format rules. > > If requested when not inside a submodule, the command returns an empty > string. > > Mentored-by: Justin Tobler > Mentored-by: Lucas Seiki Oshiro > Signed-off-by: K Jayatheerth > --- > Documentation/git-repo.adoc | 10 +++++++ > builtin/repo.c | 31 ++++++++++++++++++++ > builtin/rev-parse.c | 2 +- > submodule.c | 43 ++++++++++++++-------------- > submodule.h | 2 +- > t/t1900-repo-info.sh | 57 +++++++++++++++++++++++++++++++++++++ > 6 files changed, 122 insertions(+), 23 deletions(-) Correcting get_superproject_working_tree(), which was introduced by bf0231c661 (rev-parse: add --show-superproject-working-tree, 2017-03-08), is a major part of this step. The old commit added a single test for very basic use but this step makes not-so-basic use cases to also work correctly, right? It may be a good idea to split this step into two patches: - a patch that corrects get_superproject_working_tree(), that adds a new test or two to t1500-rev-parse.sh, next to where bf0231c661 (rev-parse: add --show-superproject-working-tree, 2017-03-08) added its test. The test would fail without the code fix to demonstrate what we improved. - another patch that uses improved get_superproject_working_tree() to add path.superproject-root.* keys, together with the updates to t1900-repo-info.sh to add tests for the new feature.