]> git.ipfire.org Git - thirdparty/git.git/commit
config: format bools gently
authorDerrick Stolee <stolee@gmail.com>
Mon, 23 Feb 2026 12:26:47 +0000 (12:26 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Feb 2026 21:23:40 +0000 (13:23 -0800)
commit53959a8ba22d80f78daa693dfc2f76fd3afe80e2
tree3a0c49f9ba13cbf6646f9f920e039d7c6e46f64b
parentd744923fefb294c835d18883bac62f85ff55fc9f
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>
builtin/config.c
t/t1300-config.sh