Re: [PATCH v2] config: honor file permission bits
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 3, 2026, 19:11 UTC
- Message-ID
- <xmqqld797msp.fsf@gitster.g>
- In-Reply-To
- <aum4pZp5P0ZRC-cf@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> Nit: a curious reader might wonder why such in-tree files don't need > such protection.
But isn't it self evident that repository contents are supposed to be mutable, and you are not even supposed to muck with filesystem level tools like chmod or mv to begin with?
Show 5 quoted lines
>> + error_errno(_("file %s unwritable"), config_filename);
>
> Should we quote '%s' here? The function is quite inconsistent, where it
> sometimes quotes and sometimes doesn't. I'd say that quoting is the
> better choice though.While it probably makes sense, many of the existing messages in the same function also lack the quote. I would rather leave it for others to clean up the subsystem as a whole, as I expect there would probably be a huge fallout in expected test output ;-).