Re: [PATCH 09/11] config-batch: add 'set' v1 command
From: Derrick Stolee <hidden>
Date: 2026-02-10 04:25:05
On 2/5/2026 2:01 PM, Kristoffer Haugsbakk wrote:
On Wed, Feb 4, 2026, at 15:20, Derrick Stolee via GitGitGadget wrote:quoted
[snip] +`set` version 1:: + The `set` command writes a single key-value pair to a config + file. It specifies which file by a `<scope>` parameter from + among `system`, `global`, `local`, and `worktree`. The `<key>` + is the next positional argument. The remaining data in the line + is provided as the `<value>` to assign the config. ++ +------------ +set 1 <scope> <key> <value> +------------ ++ +These uses will match the behavior of `git config --set --<scope> <key>`--set` doesn’t exist. I think you meant `set`.
You're right. Also `git config --<scope> <key>` is the older mode. I'm not always catching myself using the old format. Or inventing a mixed-up one that never existed!
Is there support for a user-provided file? (`git config --file=...`)
Not at the moment. It's worth thinking about what that interface would be within this query model. My initial feeling is that we wouldn't want to accept arbitrary filenames on a per-command basis, but instead would want to provide an alternate file in the command-line arguments as a replacement for the local config. Thanks, -Stolee