Re: [GSoC][PATCH 0/4] teach git repo info to handle path keys
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jun 2, 2026, 13:03 UTC
- Message-ID
- <8ebc3d98-40a5-4e99-a205-34254cf5172b@gmail.com>
- In-Reply-To
- <20260601151950.30686-1-jayatheerthkulkarni2005@gmail.com>
On 01/06/2026 16:19, K Jayatheerth wrote:
Show 6 quoted lines
> > So in patches 3 and 4, we add both `path.<field>.absolute` and > `path.<field>.relative` for `gitdir` and `commondir`. Initially, > it was proposed by Ayush to use `path.absolute.<field>`, but > this would break the lexicographical order of the internal field > array. I tweaked it to place the variant at the end as a suffix instead.
I don't understand the comment about breaking the lexicographical order, surely it only breaks if the new items are added out of order? Why can't we have
path.absolute.commondir path.absolute.gitdir path.relative.commondir path.relative.gitdir
?
Thanks
Phillip
Show 46 quoted lines
> There are still a few open questions that should be addressed > by the community. I am tagging members who were involved in the > previous discussions: > > Justin Tobler, Lucas Seiki Oshiro, Junio, Phillip Wood, > brian m. carlson, and Ayush Jha. > > Apologies if I missed anyone; I included everyone who reviewed > or participated in the discussions of Eslam's and Lucas's > patches. > > Questions: > > 1. Should there still be a --path-format flag? > 2. Should we consider a default option? > Currently we have path.gitdir.absolute; should we consider > an option where a plain path.gitdir returns some default? > If yes: > 2.1 Should we keep the default the same as rev-parse? Or > should either relative or absolute be the default? > 2.2 When printing using --all, should the default be > printed, or should we print both absolute and > relative? > 3. Is printing both absolute and relative in a single call > using --all acceptable? > If no: > 3.1 What's a better approach? > > I have discussed these changes with both Justin and Lucas > internally. This series is presented to gather opinions from the > wider community before moving forward. > > K Jayatheerth (4): > path: add strbuf_add_path for formatting paths > rev-parse: use strbuf_add_path for path formatting > repo: add path.gitdir with absolute and relative suffix formatting > repo: add path.commondir with absolute and relative suffix formatting > > Documentation/git-repo.adoc | 15 ++++++ > builtin/repo.c | 50 ++++++++++++++++++ > builtin/rev-parse.c | 100 ++++++++---------------------------- > path.c | 58 +++++++++++++++++++++ > path.h | 16 ++++++ > t/t1900-repo-info.sh | 32 ++++++++++++ > 6 files changed, 192 insertions(+), 79 deletions(-) >