Re: [PATCH 1/4] builtin/config: introduce `--default`
From: Eric Sunshine <hidden>
Date: 2018-03-06 07:08:49
From: Eric Sunshine <hidden>
Date: 2018-03-06 07:08:49
On Mon, Mar 5, 2018 at 9:17 PM, Taylor Blau [off-list ref] wrote:
In an aim to replace: $ git config --get-color slot [default] [...] with: $ git config --default default --color slot [...] introduce `--defualt` to behave as if the given default were present and
s/--defualt/--default/
assigned to slot in the case that that slot does not exist. Values filled by `--default` behave exactly as if they were present in the affected configuration file; they will be parsed by type specifiers without the knowledge that they are not themselves present in the configuraion. Specifically, this means that the following will work: $ git config --int --default 1M does.not.exist 1048576 In subsequent commits, we will offer `--color`, which (in conjunction with `--default`) will be sufficient to replace `--get-color`. Signed-off-by: Taylor Blau <redacted>