From: Junio C Hamano Date: Mon, 26 Oct 2026 15:01:47 GMT Subject: Re: [RFC/PATCH] config: honor file permission bits Message-ID: In-Reply-To: Patrick Steinhardt writes: > On Fri, Oct 23, 2026 at 07:54:13AM -0700, Junio C Hamano wrote: >> Patrick Steinhardt 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.