]> git.99rst.org Git - git.git/commit
repo: add path.commondir with absolute and relative suffix formatting
authorK Jayatheerth <redacted>
Wed, 24 Jun 2026 03:37:47 +0000 (09:07 +0530)
committerJunio C Hamano <redacted>
Wed, 24 Jun 2026 04:15:52 +0000 (21:15 -0700)
commit1efca6d0b2304360901dccfcbd5ea4f276ecf8c9
treed6608e2e12b0c6d4f5d7c8c44dbff67c48dcf622
parent60cafea9078097f051f39c234fb6aa8f6051b2bd
repo: add path.commondir with absolute and relative suffix formatting

Scripts working with worktree setups need a reliable way to discover
the common directory, which diverges from the git directory when
multiple worktrees are in use. There is no way to retrieve this path
from git repo info today.

Introduce path.commondir.absolute and path.commondir.relative keys.
Exposing explicit format variants rather than a single key with a
default avoids ambiguity for scripts that require predictable output.

Mentored-by: Justin Tobler <redacted>
Mentored-by: Lucas Seiki Oshiro <redacted>
Signed-off-by: K Jayatheerth <redacted>
Signed-off-by: Junio C Hamano <redacted>
Documentation/git-repo.adoc
builtin/repo.c
t/t1900-repo-info.sh
git clone https://git.99rst.org/PROJECT