aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-12-11 10:40:54 -0800
committerJunio C Hamano <gitster@pobox.com>2015-12-11 10:40:55 -0800
commite0048d3e0d95dca049423b17b97e27fef1d0da5a (patch)
treee0bfd398f949ea7f0c1eb8fc91e25eb9eba38fac /config.c
parent7d722536dd86b5fbd0c0434bfcea5588132ee6ad (diff)
parent08a3651fe7f3163acbac461e0daf370329a1d332 (diff)
downloadgit-e0048d3e0d95dca049423b17b97e27fef1d0da5a.tar.gz
git-e0048d3e0d95dca049423b17b97e27fef1d0da5a.tar.xz
Merge branch 'sg/lock-file-commit-error'
Cosmetic improvement to lock-file error messages. * sg/lock-file-commit-error: Make error message after failing commit_lock_file() less confusing
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/config.c b/config.c
index 248a21ab9..86a5eb257 100644
--- a/config.c
+++ b/config.c
@@ -2144,7 +2144,8 @@ int git_config_set_multivar_in_file(const char *config_filename,
}
if (commit_lock_file(lock) < 0) {
- error("could not commit config file %s", config_filename);
+ error("could not write config file %s: %s", config_filename,
+ strerror(errno));
ret = CONFIG_NO_WRITE;
lock = NULL;
goto out_free;
@@ -2330,7 +2331,8 @@ int git_config_rename_section_in_file(const char *config_filename,
fclose(config_file);
unlock_and_out:
if (commit_lock_file(lock) < 0)
- ret = error("could not commit config file %s", config_filename);
+ ret = error("could not write config file %s: %s",
+ config_filename, strerror(errno));
out:
free(filename_buf);
return ret;