Re: [PATCH 00/11] [RFC] config-batch: a new builtin for tools querying config
From: brian m. carlson <hidden>
Date: 2026-02-05 00:04:35
On 2026-02-04 at 14:19:52, Derrick Stolee via GitGitGadget wrote:
This RFC explores a new git config-batch builtin that allows tools to interact with Git's config data with multiple queries using a single process. This is an orthogonal alternative to the effort to create a stable, linkable config API. Both approaches have different strengths. My main motivation is the performance of git-credential-manager on Windows platforms as it can call git config get dozens of times. At 150-200ms per execution, that adds up significantly, leading to multiple seconds just to load a credential that already exists. I believe that there are other benefits to having this interface available, but I can't recall any specifics at the moment. This RFC adds git config-batch with a protocol over stdin/stdout for executing multiple config queries. The implementation has a limited set of potential queries, but also creates a model for compatibility for tools to automatically adapt to different Git versions. I'm submitting this as an RFC before I've polished all of the details because I want to make sure I'm going down a good direction. Please focus feedback in these questions: * Is this a worthwhile feature to add to Git?
Git LFS has the same needs, but I believe it can use `git config -l -z` to do that and parse the config options itself. If this is just config fetching, I'm not sure of the additional utility that such a feature would add. If that interface _almost_ meets your needs, could we add functionality there instead of a new interface? If you need to set many keys, I'm curious as to why that is. -- brian m. carlson (they/them) Toronto, Ontario, CA
Attachments
- signature.asc [application/pgp-signature] 262 bytes