From: Junio C Hamano <gitster@pobox.com>
To: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
Cc: git@vger.kernel.org, jltobler@gmail.com, lucasseikioshiro@gmail.com
Subject: Re: [GSoC Patch] repo: support category-based prefix querying for info keys
Date: Fri, 03 Jul 2026 15:49:34 -0700 [thread overview]
Message-ID: <xmqq7bnbheo1.fsf@gitster.g> (raw)
In-Reply-To: <20260703164709.22723-1-jayatheerthkulkarni2005@gmail.com> (K. Jayatheerth's message of "Fri, 3 Jul 2026 22:17:09 +0530")
K Jayatheerth <jayatheerthkulkarni2005@gmail.com> writes:
> 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).
prev parent reply other threads:[~2026-07-03 22:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 16:47 [GSoC Patch] repo: support category-based prefix querying for info keys K Jayatheerth
2026-07-03 22:49 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq7bnbheo1.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jayatheerthkulkarni2005@gmail.com \
--cc=jltobler@gmail.com \
--cc=lucasseikioshiro@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox