Re: [PATCH 09/11] config-batch: add 'set' v1 command
On Wed, Feb 4, 2026, at 15:20, Derrick Stolee via GitGitGadget wrote:
Show 13 quoted lines
>[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`.
Show 24 quoted lines
>[snip]
> +int location_options_set_scope(struct config_location_options *opts,
> + enum config_scope scope)
> +{
> + switch (scope) {
> + case CONFIG_SCOPE_SYSTEM:
> + opts->use_system_config = 1;
> + break;
> +
> + case CONFIG_SCOPE_GLOBAL:
> + opts->use_global_config = 1;
> + break;
> +
> + case CONFIG_SCOPE_LOCAL:
> + opts->use_local_config = 1;
> + break;
> +
> + case CONFIG_SCOPE_WORKTREE:
> + opts->use_worktree_config = 1;
> + break;
> +
> + default:
> + return -1;
> + }Is there support for a user-provided file? (`git config --file=...`)
Show 5 quoted lines
> +
> + return 0;
> +}
> +
>[snip]