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>maint
parent
6a7f363170
commit
990c98d2bd
|
@ -2518,10 +2518,11 @@ static int rename_tmp_log(const char *newrefname)
|
||||||
ret = raceproof_create_file(path, rename_tmp_log_callback, &true_errno);
|
ret = raceproof_create_file(path, rename_tmp_log_callback, &true_errno);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
if (errno == EISDIR)
|
if (errno == EISDIR)
|
||||||
error("Directory not empty: %s", path);
|
error("directory not empty: %s", path);
|
||||||
else
|
else
|
||||||
error("unable to move logfile "TMP_RENAMED_LOG" to logs/%s: %s",
|
error("unable to move logfile %s to %s: %s",
|
||||||
newrefname, strerror(true_errno));
|
git_path(TMP_RENAMED_LOG), path,
|
||||||
|
strerror(true_errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
free(path);
|
free(path);
|
||||||
|
|
Loading…
Reference in New Issue