]> git.ipfire.org Git - thirdparty/git.git/commit
repo: add path.superproject-working-tree with absolute and relative suffixes
authorK Jayatheerth <jayatheerthkulkarni2005@gmail.com>
Sun, 26 Jul 2026 10:43:38 +0000 (16:13 +0530)
committerJunio C Hamano <gitster@pobox.com>
Sun, 26 Jul 2026 14:13:31 +0000 (07:13 -0700)
commit0b038af81bb89712e93543b2bf672cfbb27d4c2c
treec70ebc3f71dcb993199c5a50a13eef3e165f9f5b
parent4f4f0e15d62a5f0a571d27e98c4a04abc28b9479
repo: add path.superproject-working-tree with absolute and relative suffixes

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-working-tree.absolute` and
`path.superproject-working-tree.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 <jltobler@gmail.com>
Mentored-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-repo.adoc
builtin/repo.c
t/t1900-repo-info.sh