File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,10 @@ outgoing values are canonicalize-able under the given <type>. If no
43
43
`--type=<type>` is given, no canonicalization will be performed. Callers may
44
44
unset an existing `--type` specifier with `--no-type`.
45
45
46
- With `--type=bool` or `--type=bool -or-int`, if `value_regex` is given
46
+ With `--type=bool-or-int`, if `value_regex` is given
47
47
and canonicalizes to a boolean value, it matches all entries
48
48
that canonicalize to the same boolean value.
49
- The support for non-canonicalizing values of `value_regex` with
50
- `--type=bool` is deprecated.
49
+ With `--type=bool`, `value_regex` (if given) must canonicalize.
51
50
52
51
When reading, the values are read from the system, global and
53
52
repository local configuration files by default, and options
Original file line number Diff line number Diff line change @@ -303,8 +303,8 @@ static int handle_value_regex(const char *regex_)
303
303
cmd_line_value .boolean = boolval ;
304
304
return 0 ;
305
305
}
306
- warning (_ ("value_regex '%s' cannot be canonicalized "
307
- "to a boolean value" ), regex_ );
306
+ die (_ ("value_regex '%s' cannot be canonicalized "
307
+ "to a boolean value" ), regex_ );
308
308
}
309
309
310
310
if (type == TYPE_BOOL_OR_INT ) {
Original file line number Diff line number Diff line change @@ -465,11 +465,8 @@ test_expect_success '--get canonicalizes integer value_regex with --type=bool' '
465
465
'
466
466
467
467
test_expect_success ' --type=bool with "non-bool" value_regex' '
468
- echo true >expect &&
469
- git config --type=bool --get foo.y4 "t.*" >output 2>err &&
470
- test_cmp expect output &&
468
+ test_must_fail git config --type=bool --get foo.y4 t >output 2>err &&
471
469
test_i18ngrep "cannot be canonicalized" err &&
472
- test_must_fail git config --type=bool --get foo.y4 "T.*" >output &&
473
470
test_must_be_empty output
474
471
'
475
472
You can’t perform that action at this time.
0 commit comments