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

Re: [GSoC Patch] repo: support category-based prefix querying for info keys

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 3, 2026, 22:49 UTC
Message-ID
<xmqq7bnbheo1.fsf@gitster.g>
In-Reply-To
<20260703164709.22723-1-jayatheerthkulkarni2005@gmail.com>
K Jayatheerth <jayatheerthkulkarni2005@gmail.com> writes:
Show 9 quoted lines
> Currently, git repo info relies on an all-or-nothing query model
> where users must either know the exact, fully-qualified key name or use
> the --all flag to dump the entire repository state.
> As the number of supported keys expands, dumping all metadata and
> relying on external filters like grep becomes an inefficient bottleneck
> for a plumbing command.
>
> Enable category-based prefix querying so users can request
> entire groups of related keys natively

You mean "repo info" takes layout.bare and layout.shallow (right now, later we may gain a lot more), so you want to say "everything under 'layout' to grab these two values?

Why should we limit ourselves to "prefix match"? Would a glob like "layout.*", or "path.*.absolute", work better? Especially the latter, i.e., "I want the path variables, but am not interested in their .relative values, only the .absolute ones." It is especially puzzling as you are going to do a dumb linear search in this mode anyway.

Perhaps during each iteration of the loop over argv[], you can first look for exact match using the existing bsearch() codepath. If that succeeds, you have a single key to return the value for. If it does not match exactly any key, use the new "prefix" (or "glob" which I think would make far more sense) match codepath to find which key(s) to return values for, so iterate over them (or say "Hey, that pattern does not match any key!" and fail).

Previous: K JayatheerthNext: K Jayatheerth
Message 2 of 3 in “repo: support category-based prefix querying for info keys”
  1. repo: support category-based prefix querying for info keysK Jayatheerth, Jul 3, 2026
  2. Junio C HamanoJul 3, 2026
  3. K JayatheerthJul 12, 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.