From: Phillip Wood <phillip.wood123@gmail.com>
To: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>, git@vger.kernel.org
Cc: sandals@crustytoothpaste.net, kumarayushjha123@gmail.com,
a3205153416@gmail.com, jayatheerthkulkarni2005@gmail.com,
valusoutrik@gmail.com, pushkarkumarsingh1970@gmail.com
Subject: Re: [PATCH 0/4] repo: add support for path-related fields
Date: Sun, 1 Mar 2026 10:44:08 +0000 [thread overview]
Message-ID: <c074cec5-eaac-49d0-89cc-d2ac9d605e59@gmail.com> (raw)
In-Reply-To: <20260228224252.72788-1-lucasseikioshiro@gmail.com>
Hi Lucas
On 28/02/2026 22:05, Lucas Seiki Oshiro wrote:
> Hi!
>
> This patch series adds support for path-related fields in repo-info, based on
> what we already have in git-rev-parse:
>
> 1. The two first patches moves the path formatting used by git-rev-parse to
> path.c. This will allow us to reuse this code in git-repo-info
> 2. The second patch add a new flag --path-format to git-repo-info, similar to
> the flag of git-rev-parse with the same name
> 3. Add the new field `path.toplevel` as a proof of concept.
How does this effort relate to similar effort at at
https://lore.kernel.org/pull.2208.v5.git.git.1772220640.gitgitgadget@gmail.com
?
Also note the suggestion from Junio in that thread to use
"path.working-tree" rather than copying the name from "git rev-parse"
> This arises from the fact that I didn't know what should be the default behavior
> of git-repo-info when dealing with paths. Some ideas were:
>
> 1. Add --path-format, just like we have in git-rev-parse
I think that's the best solution. Having different defaults for
different paths like rev-parse is confusing and having different keys
for absolute and relative versions of the same path gets rather verbose.
Thanks
Phillip
> 2. Use what rev-parse uses by default
> 3. Add keys for both relative and absolute formats
>
> In this case, I'm using 1, but I'm not sure if it's the best option. One
> downside that I see here is that git-repo-info won't be able to return
> a relative and an absolute path for different keys in the same call.
>
> Since there are many people interested in contributing to git-repo-info, I'll
> leave the remaining path-related fields to them :-)
>
> I'm CC'ing here:
>
> - brian, who was the original author of the `print_path` [1]
> - Ayush, Tian, Jayatheerth, Soutrik and Pushkar, since they expressed interested
> in contributing to git-repo-info in GSoC. (I hope that I didn't forget anyone)
>
> This patch is based on top of master 2cc7191751 (The 8th batch, 2026-02-27) with
> lo/repo-leftover-bits merged.
>
> [1] fac60b8925 (rev-parse: add option for absolute or relative path formatting, 2020-12-13)
>
> Lucas Seiki Oshiro (4):
> rev-parse: prepend `path_` to path-related enums
> path: add new function strbuf_add_path
> repo: add the --format-path flag
> repo: add the field path.toplevel
>
> Documentation/git-repo.adoc | 8 ++-
> builtin/repo.c | 67 +++++++++++++++++++------
> builtin/rev-parse.c | 98 +++++++------------------------------
> path.c | 51 +++++++++++++++++++
> path.h | 23 +++++++++
> t/t1900-repo-info.sh | 69 ++++++++++++++++++++++++++
> 6 files changed, 221 insertions(+), 95 deletions(-)
>
next prev parent reply other threads:[~2026-03-01 10:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-28 22:05 [PATCH 0/4] repo: add support for path-related fields Lucas Seiki Oshiro
2026-02-28 22:05 ` [PATCH 1/4] rev-parse: prepend `path_` to path-related enums Lucas Seiki Oshiro
2026-02-28 22:05 ` [PATCH 2/4] path: add new function strbuf_add_path Lucas Seiki Oshiro
2026-02-28 22:05 ` [PATCH 3/4] repo: add the --format-path flag Lucas Seiki Oshiro
2026-02-28 22:05 ` [PATCH 4/4] repo: add the field path.toplevel Lucas Seiki Oshiro
2026-03-01 4:24 ` Tian Yuchen
2026-03-01 20:21 ` Lucas Seiki Oshiro
2026-03-02 4:54 ` Tian Yuchen
2026-03-01 2:58 ` [PATCH 0/4] repo: add support for path-related fields JAYATHEERTH K
2026-03-01 5:45 ` Ayush Jha
2026-03-01 6:50 ` JAYATHEERTH K
2026-03-01 19:55 ` Lucas Seiki Oshiro
2026-03-03 3:27 ` Ayush Jha
2026-03-01 19:49 ` Lucas Seiki Oshiro
2026-03-01 10:44 ` Phillip Wood [this message]
2026-03-01 19:40 ` Lucas Seiki Oshiro
2026-03-01 21:25 ` brian m. carlson
2026-03-02 16:38 ` Junio C Hamano
2026-03-02 18:51 ` Tian Yuchen
2026-03-02 21:34 ` Junio C Hamano
2026-03-03 2:48 ` JAYATHEERTH K
2026-03-03 4:32 ` Tian Yuchen
2026-03-03 7:23 ` JAYATHEERTH K
2026-03-03 9:28 ` Tian Yuchen
2026-03-03 10:31 ` JAYATHEERTH K
2026-03-08 0:29 ` Lucas Seiki Oshiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c074cec5-eaac-49d0-89cc-d2ac9d605e59@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=a3205153416@gmail.com \
--cc=git@vger.kernel.org \
--cc=jayatheerthkulkarni2005@gmail.com \
--cc=kumarayushjha123@gmail.com \
--cc=lucasseikioshiro@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=pushkarkumarsingh1970@gmail.com \
--cc=sandals@crustytoothpaste.net \
--cc=valusoutrik@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox