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
K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
Date
Jul 12, 2026, 02:52 UTC
Message-ID
<CA+rGoLdYm3aHnfXWiCh4YQyYyz=TDCB-JWZ51v0nwzxzfACcQg@mail.gmail.com>
In-Reply-To
<xmqq7bnbheo1.fsf@gitster.g>
Hey Junio,
On Sat, Jul 4, 2026 at 4:19 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
>
> 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).

Sorry this response took a long time but I have given a good thought about this You are right that adding globs makes much more sense in this case. I was initially skeptical about globs, but looking at the direction we took in path.* keys it makes much more sense.

But I think adding a query system is not a good idea anymore. I have discussed this with my mentors at length. Since we are building a plumbing command, we couldn't think of a use-case where people would need globs over hard-coded value in scripts. Also globing might introduce uncertainties if the script doesn't have an appropriate fall back. I am also wondering if there will be any significant performance difference with --all vs globs.

A query system in itself is meant to simplify commands for user usage, but I don't think adding it makes sense "yet".

I also wanted your opinion on this

For my GSoC I can pick the histograms patch in the git repo structure instead of this.

Regards,
- K Jayatheerth
Previous: Junio C Hamano
Message 3 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.