Subject: Re: [PATCH 2/3] config: values of pathname type can be prefixed with :(optional)

From: Phillip Wood <[email-masked]>
Date: Fri, 2 May 2025 15:28:05 +0100

On 02/05/2025 09:52, Patrick Steinhardt wrote:
> On Thu, May 01, 2025 at 02:40:56PM -0700, Junio C Hamano wrote:
> 
>> ++
>> +If prefixed with `:(optional)`, the configuration variable is treated
>> +as if it does not exist, if the named path does not exist or names an
>> +empty file.
> 
> I can see why it may be useful to allow for non-existent paths. But I
> wonder whether we really should be skipping over empty files, as well,
> as it may be assuming too much about the semantics of a given config
> key. In other words, are we reasonably sure that there won't ever be a
> usecase where you may want to specify an optional and empty file? And
> are there any use cases where an empty file should be ignored?

That's my thought too - ignoring a missing file sounds like a good idea 
but why an empty file too?

Best Wishes

Phillip