git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/4] repo: add support for path-related fields

From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Date
Mar 1, 2026, 19:40 UTC
Message-ID
<491CD222-D595-4408-B78C-72E4C3DA0A62@gmail.com>
In-Reply-To
<c074cec5-eaac-49d0-89cc-d2ac9d605e59@gmail.com>
> Hi Lucas
Hi, Phillip!
> How does this effort relate to similar effort at at
> https://lore.kernel.org/pull.2208.v5.git.git.1772220640.gitgitgadget@gmail.com ?

I have this patch series started since July, but I could only send this after having my two previous changes in git-repo-info accepted.

I think that patch series you mentioned is based on some previous message (or the GSoC project ideas) where I listed what was still need to be implemented. It uses a similar --path-format flag, but without dealing with the multiple possibilities currently used by git-rev-parse (see [1]).

The original print_path from git-rev-parse has four possible default formats (relative, relative if there's a shared root, canonical (absolute), and unmodified), and we can force it to use the relative or absolute formats. If I understood it correctly, this complex logic was added ([1]) to allow the user to force one of these two formats without breaking the default behavior. Since git-repo-info is a new command, we are free from being compatible with that, and perhaps this doesn't make sense.

Since there are many people interested in contributing to git-repo-info, especially in the path-* fields, I just wanted to finish what I have here and leave the rest for them :-)

Show 6 quoted lines
>> 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.

I agree, but I still think that it feels weird that we won't be able return absolute and relative paths in a single git-repo-info call. But it also won't cost too much to call it twice.

> Thanks

Thanks, Phillip! Phillip

PS: I'm also CC'ing:
- Eslam (the author of the patch mentioned by Phillip)
- Karthik, Justin, Ayush, and Siddhart (possible mentors for
  "Improve the new git repo command")
- Patrick, who was my GSoC mentor and the person I first
  discussed with about --path-format
[1] fac60b8925 (rev-parse: add option for absolute or relative path formatting, 2020-12-13)
Previous: Phillip WoodNext: brian m. carlson
Message 16 of 26 in “repo: add support for path-related fields”
  1. 0/4 repo: add support for path-related fieldsLucas Seiki Oshiro, Feb 28, 2026
  2. 1/4 rev-parse: prepend `path_` to path-related enumsLucas Seiki Oshiro, Feb 28, 2026
  3. 2/4 path: add new function strbuf_add_pathLucas Seiki Oshiro, Feb 28, 2026
  4. 3/4 repo: add the --format-path flagLucas Seiki Oshiro, Feb 28, 2026
  5. 4/4 repo: add the field path.toplevelLucas Seiki Oshiro, Feb 28, 2026
  6. Tian YuchenMar 1, 2026
  7. Lucas Seiki OshiroMar 1, 2026
  8. Tian YuchenMar 2, 2026
  9. JAYATHEERTH KMar 1, 2026
  10. Ayush JhaMar 1, 2026
  11. JAYATHEERTH KMar 1, 2026
  12. Lucas Seiki OshiroMar 1, 2026
  13. Ayush JhaMar 3, 2026
  14. Lucas Seiki OshiroMar 1, 2026
  15. Phillip WoodMar 1, 2026
  16. Lucas Seiki OshiroMar 1, 2026
  17. brian m. carlsonMar 1, 2026
  18. Junio C HamanoMar 2, 2026
  19. Tian YuchenMar 2, 2026
  20. Junio C HamanoMar 2, 2026
  21. JAYATHEERTH KMar 3, 2026
  22. Tian YuchenMar 3, 2026
  23. JAYATHEERTH KMar 3, 2026
  24. Tian YuchenMar 3, 2026
  25. JAYATHEERTH KMar 3, 2026
  26. Lucas Seiki OshiroMar 8, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.