]> Kevux Git Server - rit/commit
config: format expiry dates quietly
authorDerrick Stolee <stolee@gmail.com>
Mon, 23 Feb 2026 12:26:51 +0000 (12:26 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 23 Feb 2026 21:23:41 +0000 (13:23 -0800)
commit9cb4a5e1ba3e586e77b1c026d509f284b4c55764
tree2cd81aca002845daf8e93431b12f967a337ea432
parentbcfb9128c9ce87dfeacaffe051257f7a5fc866e9
config: format expiry dates quietly

Move the logic for formatting expiry date config values into a helper
method and use quiet parsing when needed.

Note that git_config_expiry_date() will show an error on a bad parse and
not die() like most other git_config...() parsers. Thus, we use
'quietly' here instead of 'gently'.

There is an unfortunate asymmetry in these two parsing methods, but we
need to treat a positive response from parse_expiry_date() as an error
or we will get incorrect values.

This updates the behavior of 'git config list --type=expiry-date' to be
quiet when attempting parsing on non-date values.

Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/config.c
t/t1300-config.sh