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

[RFC] git repo info: exposing repository paths

From
Pushkar Singh <pushkarkumarsingh1970@gmail.com>
Date
Feb 10, 2026, 14:11 UTC
Message-ID
<CALE2CrTt_2-9C4zCrZPBabtsWY=+Mk-bH4Jaemk=yHtfpoLjfg@mail.gmail.com>
Hi all,

I’ve been looking at the "git repo" command recently, mostly comparing "git repo info" with what I usually reach for via "git rev-parse".

One thing I noticed is that git repo info currently reports repository properties like layout and formats, but none of the repository paths that scripts often need.

For example, as of now:

git rev-parse --git-dir git rev-parse --common-dir git rev-parse --git-path hooks

are commonly used by scripts and tooling to figure out where things actually live on disk.

I wanted to ask whether it would make sense for git repo info to eventually expose some of these as structured keys, starting with something minimal like "git-dir".

My idea is not to completely replace rev-parse, but to let "git repo info" act as a more discoverable, descriptive interface for repository metadata, including paths, where appropriate.

One question I am unsure about is whether such paths should be reported as absolute or relative (for example, relative to the working tree or invocation directory), and whether git-dir would be a reasonable first step before considering others.

I wanted to ask first before making any changes, and would appreciate guidance on whether this direction makes sense.

Thanks, Pushkar

Next: Patrick Steinhardt
Message 1 of 10 in “[RFC] git repo info: exposing repository paths”
  1. Pushkar SinghFeb 10, 2026
  2. Patrick SteinhardtFeb 11, 2026
  3. Pushkar SinghFeb 18, 2026
  4. 0/2 repo info: add path.git-dir and path.common-dirPushkar Singh, Mar 1, 2026
  5. 1/2 repo: add the field path.git-dirPushkar Singh, Mar 1, 2026
  6. 2/2 repo: add the field path.common-dirPushkar Singh, Mar 1, 2026
  7. K JayatheerthMar 1, 2026
  8. Lucas Seiki OshiroMar 1, 2026
  9. Pushkar SinghMar 1, 2026
  10. Junio C HamanoMar 2, 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.