Subject: [PATCH 0/3] specifying a file that can optionally exist

From: Junio C Hamano <[email-masked]>
Date: Thu, 1 May 2025 14:40:54 -0700

In a discussion some years ago (cf. <[email-masked]>),
we wondered if it is a good idea to allow a configuration variable
(or a command line option for that matter) to name an "optional"
file, and pretend as if such a configuration setting or a command
line option was not even given when the named file did not exist or
empty.  Then I floated a set of patches to implement the feature,
but the topic did not get any traction and was dropped.

I am resurrecting the patches after seeing some interest in it in
recent discussion threads; it would be easier for people to
comment on, if they are in more recent parts of their mailbox.
I didn't change anything in the patch; they are verbatim copies
that I happened to have found lying somewhere in my filesystem.

Even though I updated the documentation for the configuration
variables, I didn't find a good central place to do the same for
parse-options.  I'll leave it as an exercise for the readers ;-).

The first patch is a preliminary clean-up for test script that is
used to house tests added by the later patches.

The second patch is for configuration variables, and the last one is
for command line options.

Junio C Hamano (3):
  t7500: make each piece more independent
  config: values of pathname type can be prefixed with :(optional)
  parseopt: values of pathname type can be prefixed with :(optional)

 Documentation/config.txt                  |  5 +++-
 config.c                                  | 16 +++++++++--
 parse-options.c                           | 31 +++++++++++++-------
 t/t7500-commit-template-squash-signoff.sh | 35 +++++++++++++++++------
 4 files changed, 65 insertions(+), 22 deletions(-)

-- 
2.47.0-148-g19c85929c5