git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC/PATCH] config: honor file permission bits

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 26, 2026, 15:01 UTC
Message-ID
<xmqq5wyov738.fsf@gitster.g>
In-Reply-To
<at8R_QThIEedVbO8@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 18 quoted lines
> On Fri, Oct 23, 2026 at 07:54:13AM -0700, Junio C Hamano wrote:
>> Patrick Steinhardt <ps@pks.im> writes:
>> 
>> > What I wonder is what makes our config file so special compared to
>> > everything else that uses lockfiles. Or put differently: if we think
>> > it's important to honor permissions bits (which I think is sensible),
>> > shouldn't we do that in a central location like in "lockfile.c" so that
>> > all users of this interface behave the same?
>> 
>> The $HOME/.gitconfig file and its XDG counterparts are the only
>> out-of-tree files that suffer from this issue, and being outside the
>> repository is what makes them special.  Theoretically, /etc/gitconfig
>> on a multi-user system could have the same issue, but the containing
>> directory would typically be read-only for regular users, which makes
>> the issue irrelevant there.
>
> That explanation makes sense to me. Probably something to put into the
> commit message :)

I ended up rewriting the whole thing from scratch to follow the recommended flow more closely, starting from an observation of an end-user perceived problem, analysis of the issue, and the solution. The above naturally became a sidenote for the solution description.

Thanks.
Previous: Patrick SteinhardtNext: Junio C Hamano
Message 8 of 10 in “config: honor file permission bits”
  1. config: honor file permission bitsJunio C Hamano, Oct 19, 2026
  2. Junio C HamanoOct 22, 2026
  3. brian m. carlsonOct 22, 2026
  4. Junio C HamanoOct 22, 2026
  5. Patrick SteinhardtOct 23, 2026
  6. Junio C HamanoOct 23, 2026
  7. Patrick SteinhardtOct 26, 2026
  8. Junio C HamanoOct 26, 2026
  9. config: honor file permission bitsJunio C Hamano, Oct 26, 2026
  10. Patrick SteinhardtNov 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.