Re: [RFC/PATCH 0/2] Re: [PATCH] config: warn on inaccessible files

2012-10-14 Thread Jeff King
On Sat, Oct 13, 2012 at 05:02:10PM -0700, Jonathan Nieder wrote: Before reading a config file, we check !access(path, R_OK) to make sure that the file exists and is readable. If it's not, then we silently ignore it. git became noisy: $ git fetch --all warning: unable to access

Re: [RFC/PATCH 0/2] Re: [PATCH] config: warn on inaccessible files

2012-10-14 Thread Jeff King
On Sat, Oct 13, 2012 at 09:55:22PM -0700, Junio C Hamano wrote: When ~/.gitconfig is unreadable (EPERM), the messages are a symptom of an older issue: the config file is being ignored. Shouldn't git error out instead so the permissions can be fixed? E.g., if the sysadmin has set

Re: [RFC/PATCH 0/2] Re: [PATCH] config: warn on inaccessible files

2012-10-14 Thread Jonathan Nieder
Junio C Hamano wrote: If the config side can be switched to unconditionally attempt to fopen and then deal with an error when it happens, we can get rid of access_or_{warn,die} and replace them with fopen_or_{warn,die} and use them from the two

[RFC/PATCH 0/2] Re: [PATCH] config: warn on inaccessible files

2012-10-13 Thread Jonathan Nieder
Hi Jeff, In August, Jeff King wrote: Before reading a config file, we check !access(path, R_OK) to make sure that the file exists and is readable. If it's not, then we silently ignore it. git became noisy: $ git fetch --all warning: unable to access '/home/jrn/.config/git/config': Not a

Re: [RFC/PATCH 0/2] Re: [PATCH] config: warn on inaccessible files

2012-10-13 Thread Junio C Hamano
Jonathan Nieder jrnie...@gmail.com writes: Hi Jeff, In August, Jeff King wrote: Before reading a config file, we check !access(path, R_OK) to make sure that the file exists and is readable. If it's not, then we silently ignore it. git became noisy: $ git fetch --all warning: unable