Re: [PATCH 2/2] config: treat user and xdg config permission problems as errors

2012-10-14 Thread Jeff King
On Sat, Oct 13, 2012 at 05:04:02PM -0700, Jonathan Nieder wrote: Better to error out and ask the user to correct the problem. This only affects the user and xdg config files, since the user presumably has enough access to fix their permissions. If the system config file is unreadable, the

Re: [PATCH 2/2] config: treat user and xdg config permission problems as errors

2012-10-14 Thread Jonathan Nieder
Jeff King wrote: For example, servers may depend on /etc/gitconfig to enforce security policy (e.g., setting transfer.fsckObjects or receive.deny*). Perhaps our default should be safe, and people can use GIT_CONFIG_NOSYSTEM to work around a broken machine. Very good point. How about these

Re: [PATCH 2/2] config: treat user and xdg config permission problems as errors

2012-10-14 Thread Jeff King
On Sun, Oct 14, 2012 at 01:42:44AM -0700, Jonathan Nieder wrote: Jeff King wrote: For example, servers may depend on /etc/gitconfig to enforce security policy (e.g., setting transfer.fsckObjects or receive.deny*). Perhaps our default should be safe, and people can use GIT_CONFIG_NOSYSTEM

[PATCH 2/2] config: treat user and xdg config permission problems as errors

2012-10-13 Thread Jonathan Nieder
Git reads multiple configuration files: settings come first from the system config file (typically /etc/gitconfig), then the xdg config file (typically ~/.config/git/config), then the user's dotfile (~/.gitconfig), then the repository configuration (.git/config). Git has always used access(2) to