repack: improve warnings about failure of renaming and removing files
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ffc9329f48
commit
0b63c6a5b7
@ -327,7 +327,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
|||||||
chmod(fname_old, statbuffer.st_mode);
|
chmod(fname_old, statbuffer.st_mode);
|
||||||
}
|
}
|
||||||
if (rename(fname_old, fname))
|
if (rename(fname_old, fname))
|
||||||
exit(errno);
|
die_errno(_("renaming '%s' failed"), fname_old);
|
||||||
free(fname);
|
free(fname);
|
||||||
free(fname_old);
|
free(fname_old);
|
||||||
}
|
}
|
||||||
@ -341,7 +341,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
|
|||||||
packdir,
|
packdir,
|
||||||
item->string,
|
item->string,
|
||||||
exts[ext]);
|
exts[ext]);
|
||||||
remove_path(fname);
|
if (remove_path(fname))
|
||||||
|
warning(_("removing '%s' failed"), fname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user