Re: [PATCH 09/11] config-batch: add 'set' v1 command
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Feb 10, 2026, 04:25 UTC
- Message-ID
- <3455bd60-abe4-429b-b684-340a713d0b13@gmail.com>
- In-Reply-To
- <1cb68e4f-930d-456d-ba1b-b153e7a66524@app.fastmail.com>
On 2/5/2026 2:01 PM, Kristoffer Haugsbakk wrote:
Show 16 quoted lines
> 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 `<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