Thread (27 messages) 27 messages, 7 authors, 2025-11-04

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

flat view
STALE343d

From: Junio C Hamano <hidden>
Date: 2024-10-14 20:44:29

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v1
In a discussion a few years ago (cf. <xmqq5ywehb69.fsf@gitster.g>),
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.

Here are a few patches I did while passing time without anything
better to do.

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help