Re: [PATCH 00/11] [RFC] config-batch: a new builtin for tools querying config
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Feb 5, 2026, 00:04 UTC
- Message-ID
- <aYPeiqkw41ln7De_@fruit.crustytoothpaste.net>
- In-Reply-To
- <pull.2033.git.1770214803.gitgitgadget@gmail.com>
On 2026-02-04 at 14:19:52, Derrick Stolee via GitGitGadget wrote:
Show 22 quoted lines
> 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