summaryrefslogtreecommitdiff
path: root/refs
diff options
context:
space:
mode:
authorLibravatar Michael Haggerty <mhagger@alum.mit.edu>2017-01-06 17:22:30 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-01-07 19:30:09 -0800
commit990c98d2bd3a46df9ab873947a53b55d29a6d16f (patch)
tree8a21c16631c35bef09b23bf6e180e32a9d4dbdc8 /refs
parentrename_tmp_log(): use raceproof_create_file() (diff)
downloadtgif-990c98d2bd3a46df9ab873947a53b55d29a6d16f.tar.xz
rename_tmp_log(): improve error reporting
* Don't capitalize error strings * Report true paths of affected files Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs')
-rw-r--r--refs/files-backend.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/refs/files-backend.c b/refs/files-backend.c
index 3f18a01b4a..49a119ce4c 100644
--- a/refs/files-backend.c
+++ b/refs/files-backend.c
@@ -2518,10 +2518,11 @@ static int rename_tmp_log(const char *newrefname)
ret = raceproof_create_file(path, rename_tmp_log_callback, &true_errno);
if (ret) {
if (errno == EISDIR)
- error("Directory not empty: %s", path);
+ error("directory not empty: %s", path);
else
- error("unable to move logfile "TMP_RENAMED_LOG" to logs/%s: %s",
- newrefname, strerror(true_errno));
+ error("unable to move logfile %s to %s: %s",
+ git_path(TMP_RENAMED_LOG), path,
+ strerror(true_errno));
}
free(path);