From 53959a8ba22d80f78daa693dfc2f76fd3afe80e2 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 23 Feb 2026 12:26:47 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- t/t1300-config.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 't') 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' ' -- cgit v1.3