[GSoC Patch v7 0/3] teach git repo info to handle path keys
- From
K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
- Date
- Jun 21, 2026, 05:55 UTC
- Message-ID
- <20260621055534.46798-1-jayatheerthkulkarni2005@gmail.com>
- In-Reply-To
- <20260601151950.30686-1-jayatheerthkulkarni2005@gmail.com>
Hi!
This series teaches `git repo info` to handle `path.*` keys, allowing scripts to reliably discover core repository paths without resorting to `git rev-parse`.
The patches are structured as follows:
1. path: Extract the localized path-formatting logic out of `rev-parse` and expose it globally via `path.h` using clear append semantics.
2. repo: Introduce `path.commondir.absolute` and `path.commondir.relative` alongside a robust, isolated test helper.
3. repo: Introduce `path.gitdir.absolute` and `path.gitdir.relative` using the same standardized formatting rules.
Changes since v6:
Squashed patches 1 and 2 to avoid dead code in the tree.
Tagging Justin Tobler, Lucas Seiki Oshiro, Junio, Phillip Wood, brian m. carlson, and Ayush Jha.
Thanks for helping improve this series!
K Jayatheerth (3): path: extract append_formatted_path() and use in rev-parse repo: add path.commondir with absolute and relative suffix formatting repo: add path.gitdir with absolute and relative suffix formatting
Documentation/git-repo.adoc | 15 ++++++++ builtin/repo.c | 50 +++++++++++++++++++++++++ builtin/rev-parse.c | 73 +++++++++++++++---------------------- path.c | 69 +++++++++++++++++++++++++++++++++++ path.h | 30 +++++++++++++++ t/t1900-repo-info.sh | 58 +++++++++++++++++++++++++++++ 6 files changed, 251 insertions(+), 44 deletions(-)
-- 2.55.0-rc1