diff options
| author | Derrick Stolee <stolee@gmail.com> | 2026-02-23 12:26:47 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-23 13:23:40 -0800 |
| commit | 53959a8ba22d80f78daa693dfc2f76fd3afe80e2 (patch) | |
| tree | 3a0c49f9ba13cbf6646f9f920e039d7c6e46f64b /t | |
| parent | d744923fefb294c835d18883bac62f85ff55fc9f (diff) | |
| download | git-53959a8ba22d80f78daa693dfc2f76fd3afe80e2.tar.xz | |
config: format bools gently
Move the logic for formatting bool config values into a helper method
and use gentle parsing when needed.
This makes 'git config list --type=bool' not fail when coming across a
non-boolean value. Such unparseable values are filtered out quietly.
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
| -rwxr-xr-x | t/t1300-config.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/t/t1300-config.sh b/t/t1300-config.sh index 05a812fd6d..568cfaa3c5 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -2527,7 +2527,9 @@ test_expect_success 'list --type=bool shows only canonicalizable bool values' ' section.big=true EOF - test_must_fail git config ${mode_prefix}list --type=bool + git config ${mode_prefix}list --type=bool >actual 2>err && + test_cmp expect actual && + test_must_be_empty err ' test_expect_success 'list --type=bool-or-int shows only canonicalizable values' ' |
