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>
Michael Haggerty committed
Jan 6, 2017 at 17:22 UTC
990c98d2bd3a46df9ab873947a53b55d29a6d16f
1 file changed
+4
-3
refs/files-backend.c
+4
-3
@@ -2518,10 +2518,11 @@ static int rename_tmp_log(const char *newrefname)
2518
ret = raceproof_create_file(path, rename_tmp_log_callback, &true_errno);
2519
if (ret) {
2520
if (errno == EISDIR)
2521
- error("Directory not empty: %s", path);
2521
+ error("directory not empty: %s", path);
2522
else
2523
- error("unable to move logfile "TMP_RENAMED_LOG" to logs/%s: %s",
2524
- newrefname, strerror(true_errno));
2523
+ error("unable to move logfile %s to %s: %s",
2524
+ git_path(TMP_RENAMED_LOG), path,
2525
+ strerror(true_errno));
2526
}
2527
2528
free(path);