From: Kristoffer Haugsbakk Date: Thu, 05 Feb 2026 19:01:06 GMT Subject: Re: [PATCH 09/11] config-batch: add 'set' v1 command Message-ID: <1cb68e4f-930d-456d-ba1b-b153e7a66524@app.fastmail.com> In-Reply-To: On Wed, Feb 4, 2026, at 15:20, Derrick Stolee via GitGitGadget wrote: >[snip] > +`set` version 1:: > + The `set` command writes a single key-value pair to a config > + file. It specifies which file by a `` parameter from > + among `system`, `global`, `local`, and `worktree`. The `` > + is the next positional argument. The remaining data in the line > + is provided as the `` to assign the config. > ++ > +------------ > +set 1 > +------------ > ++ > +These uses will match the behavior of `git config --set -- `--set` doesn’t exist. I think you meant `set`. >[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=...`) > + > + return 0; > +} > + >[snip]