diff options
Diffstat (limited to 'builtin-config.c')
-rw-r--r-- | builtin-config.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin-config.c b/builtin-config.c index d98b6c2c4c..e5e243f27c 100644 --- a/builtin-config.c +++ b/builtin-config.c @@ -175,7 +175,10 @@ int cmd_config(int argc, const char **argv, const char *prefix) else if (!strcmp(argv[1], "--list") || !strcmp(argv[1], "-l")) { if (argc != 2) usage(git_config_set_usage); - return git_config(show_all_config); + if (git_config(show_all_config) < 0 && file && errno) + die("unable to read config file %s: %s", file, + strerror(errno)); + return 0; } else if (!strcmp(argv[1], "--global")) { char *home = getenv("HOME"); |