]> git.ipfire.org Git - thirdparty/git.git/commit
config: values of pathname type can be prefixed with :(optional)
authorJunio C Hamano <gitster@pobox.com>
Sun, 28 Sep 2025 21:29:15 +0000 (17:29 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Oct 2025 17:05:48 +0000 (10:05 -0700)
commit749d6d166d8e3ea0ae32ede25f9aa23aa3b5e42b
treefd09f97b04ff1c2a510be048b88e74f9b9e60527
parent6b4f07325d039db5b9a10a9228b4320ac1fc1dab
config: values of pathname type can be prefixed with :(optional)

Sometimes people want to specify additional configuration data
as "best effort" basis.  Maybe commit.template configuration file points
at somewhere in ~/template/ but on a particular system, the file may not
exist and the user may be OK without using the template in such a case.

When the value given to a configuration variable whose type is
pathname wants to signal such an optional file, it can be marked by
prepending ":(optional)" in front of it.  Such a setting that is
marked optional would avoid getting the command barf for a missing
file, as an optional configuration setting that names a missing
file is not even seen.

cf. <xmqq5ywehb69.fsf@gitster.g>

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.adoc
config.c
t/t7500-commit-template-squash-signoff.sh
wrapper.c
wrapper.h