]> git.ipfire.org Git - thirdparty/git.git/commit
config: use git_parse_int() in git_config_get_expiry_in_days()
authorRené Scharfe <l.s.r@web.de>
Sat, 27 Dec 2025 09:29:35 +0000 (10:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 28 Dec 2025 05:04:15 +0000 (14:04 +0900)
commit06188ea5f3f14040eb01aa883ac7a7a03c93e6a2
tree931ebc67751b850afbad48a5f19612086343608d
parent9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed
config: use git_parse_int() in git_config_get_expiry_in_days()

git_config_get_expiry_in_days() calls git_parse_signed() with the
maximum value of int, which is equivalent to calling git_parse_int().
Do that instead, as its shorter and clearer.

This requires demoting "days" to int to match.  Promote "scale" to
intmax_t in turn to arrive at the same result when multiplying them.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c