diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-18 14:24:06 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-18 14:24:06 -0700 |
commit | 8ffc33135268aaac55d08f4261d63b01b1004fb4 (patch) | |
tree | 760925cec62ba0c38e433900211425dfb402a88d /builtin | |
parent | 01f7d7f19f585e40af399acc307200d4b6acad25 (diff) | |
parent | 8e950dab86eafa8f4ea671fab593ca6210bc2e15 (diff) | |
download | git-8ffc33135268aaac55d08f4261d63b01b1004fb4.tar.gz |
Merge branch 'jk/config-warn-on-inaccessible-paths' into maint
The attribute system may be asked for a path that itself or its
leading directories no longer exists in the working tree, and it is
fine if we cannot open .gitattribute file in such a case. Failure
to open per-directory .gitattributes with error status other than
ENOENT and ENOTDIR should be diagnosed.
* jk/config-warn-on-inaccessible-paths:
attr: failure to open a .gitattributes file is OK with ENOTDIR
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')
-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; |