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

Re: [PATCH v3] repo: add paths.toplevel to repo info

From
Karthik Nayak <karthik.188@gmail.com>
Date
Apr 9, 2026, 13:13 UTC
Message-ID
<CAOLa=ZRo2qWES4XW3UuDxe1Wjew_z7PDy48qQdsjQzD=G8E2ew@mail.gmail.com>
In-Reply-To
<pull.2264.v3.git.git.1775714492944.gitgitgadget@gmail.com>
"Jayesh Daga via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 16 quoted lines
> From: Jayesh Daga <jayeshdaga99@gmail.com>
>
> repo info currently does not expose the repository's
> working tree root, even though this information is
> available via `repo_get_work_tree()` and
> `git rev-parse --show-toplevel`.
>
> Add a new field `paths.toplevel` to expose this value.
>
> While doing so, document the correspondence between
> `git rev-parse` options and `repo info` fields to make
> it easier to identify missing or future additions.
>
> For bare repositories, this value is empty, consistent
> with other non-applicable fields.
>

Don't we still have to decide how we want to support relative vs absolute paths? [1]

Also seeing that you're a GSoC candidate and this is part of the project that you've (and other potential contributors) applied for, our recommendation is to not start working on a project before the selection process.

[snip]
[1]: https://lore.kernel.org/git/CA+rGoLfbzXqP1Tw+94jMmWcSGPoefMv5E_fvwriad-O5CUeKHQ@mail.gmail.com/T/#m1e2b69b6b097c42b06088349947e43831cf5988f
Previous: Jayesh Daga via GitGitGadgetNext: Junio C Hamano
Message 5 of 8 in “repo: add paths.toplevel to repo info”
  1. repo: add paths.toplevel to repo infoJayesh Daga via GitGitGadget, Apr 2, 2026
  2. Junio C HamanoApr 2, 2026
  3. repo: add paths.toplevel to repo infoJayesh Daga via GitGitGadget, Apr 8, 2026
  4. repo: add paths.toplevel to repo infoJayesh Daga via GitGitGadget, Apr 9, 2026
  5. Karthik NayakApr 9, 2026
  6. Junio C HamanoApr 9, 2026
  7. Karthik NayakApr 9, 2026
  8. Junio C HamanoApr 9, 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.