Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-07 Thread Eric Sunshine
On Fri, Apr 6, 2018 at 8:58 PM, Taylor Blau wrote: > On Fri, Apr 06, 2018 at 03:40:56AM -0400, Eric Sunshine wrote: >> On Fri, Apr 6, 2018 at 2:53 AM, Eric Sunshine >> wrote: >> One other issue. If "git config --default ..." fails, the --unset line >>

Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-07 Thread Eric Sunshine
On Fri, Apr 6, 2018 at 8:49 PM, Taylor Blau wrote: > On Fri, Apr 06, 2018 at 02:53:45AM -0400, Eric Sunshine wrote: >> On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: >> > +test_expect_success 'uses --default when missing entry' ' >> > + echo quux

Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 03:40:56AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:53 AM, Eric Sunshine wrote: > > On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: > >> +test_expect_success 'uses entry when available' ' > >> + echo bar

Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-06 Thread Taylor Blau
On Fri, Apr 06, 2018 at 02:53:45AM -0400, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: > > [...] > > This commit (and those following it in this series) aim to eventually > > replace `--get-color` with a consistent alternative. By introducing > >

Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-06 Thread Eric Sunshine
On Fri, Apr 6, 2018 at 2:53 AM, Eric Sunshine wrote: > On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: >> +test_expect_success 'uses entry when available' ' >> + echo bar >expect && >> + git config --add core.foo bar && >> + git

Re: [PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-06 Thread Eric Sunshine
On Fri, Apr 6, 2018 at 2:30 AM, Taylor Blau wrote: > [...] > This commit (and those following it in this series) aim to eventually > replace `--get-color` with a consistent alternative. By introducing > `--default`, we allow the `--get-color` action to be promoted to a >

[PATCH v5 1/3] builtin/config: introduce `--default`

2018-04-06 Thread Taylor Blau
For some use cases, callers of the `git-config(1)` builtin would like to fallback to default values when the variable asked for does not exist. In addition, users would like to use existing type specifiers to ensure that values are parsed correctly when they do exist in the configuration. For