summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
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 248a21a..86a5eb2 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;