diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-12-11 10:40:54 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-12-11 10:40:55 -0800 |
commit | e0048d3e0d95dca049423b17b97e27fef1d0da5a (patch) | |
tree | e0bfd398f949ea7f0c1eb8fc91e25eb9eba38fac /config.c | |
parent | 7d722536dd86b5fbd0c0434bfcea5588132ee6ad (diff) | |
parent | 08a3651fe7f3163acbac461e0daf370329a1d332 (diff) | |
download | git-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |