From: K Jayatheerth Date: Sun, 12 Jul 2026 02:52:07 GMT Subject: Re: [GSoC Patch] repo: support category-based prefix querying for info keys Message-ID: In-Reply-To: Hey Junio, On Sat, Jul 4, 2026 at 4:19 AM Junio C Hamano wrote: > > 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