diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-07 11:08:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-07 11:08:56 -0700 |
commit | 7fe136d78f5db3317ebf60115c1d7faa87412d6a (patch) | |
tree | d9f4d19d5bd01254450e6d4b169f9e30952de79e /builtin/config.c | |
parent | 09827f2a55299cc8c09d30754c016378a15c4775 (diff) | |
parent | 55b38a48e2a7ccfaaa7897a5fccb98327fa0e3c0 (diff) | |
download | git-7fe136d78f5db3317ebf60115c1d7faa87412d6a.tar.gz |
Merge branch 'jk/config-warn-on-inaccessible-paths'
When looking for $HOME/.gitconfig etc., it is OK if we cannot read
them because they do not exist, but we did not diagnose existing
files that we cannot read.
* jk/config-warn-on-inaccessible-paths:
warn_on_inaccessible(): a helper to warn on inaccessible paths
attr: warn on inaccessible attribute files
gitignore: report access errors of exclude files
config: warn on inaccessible files
Diffstat (limited to 'builtin/config.c')
-rw-r--r-- | builtin/config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/config.c b/builtin/config.c index ada6e12114..442ccc2497 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -400,8 +400,8 @@ int cmd_config(int argc, const char **argv, const char *prefix) */ die("$HOME not set"); - if (access(user_config, R_OK) && - xdg_config && !access(xdg_config, R_OK)) + if (access_or_warn(user_config, R_OK) && + xdg_config && !access_or_warn(xdg_config, R_OK)) given_config_file = xdg_config; else given_config_file = user_config; |