Merge branch 'ar/unlink-err' into maint

* ar/unlink-err:
  print unlink(2) errno in copy_or_link_directory
  replace direct calls to unlink(2) with unlink_or_warn
  Introduce an unlink(2) wrapper which gives warning if unlink failed
This commit is contained in:
Junio C Hamano
2009-05-25 19:01:50 -07:00
26 changed files with 68 additions and 50 deletions

View File

@ -2251,7 +2251,7 @@ int move_temp_to_file(const char *tmpfile, const char *filename)
goto out;
ret = errno;
}
unlink(tmpfile);
unlink_or_warn(tmpfile);
if (ret) {
if (ret != EEXIST) {
return error("unable to write sha1 filename %s: %s\n", filename, strerror(ret));