1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-09 17:36:20 +02:00

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>
This commit is contained in:
Michael Haggerty 2017-01-06 17:22:30 +01:00 committed by Junio C Hamano
parent 6a7f363170
commit 990c98d2bd

View File

@ -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);