Skip to content

Commit

Permalink
repack: improve warnings about failure of renaming and removing files
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Stefan Beller authored and Junio C Hamano committed Sep 17, 2013
1 parent ffc9329 commit 0b63c6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builtin/repack.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
chmod(fname_old, statbuffer.st_mode);
}
if (rename(fname_old, fname))
exit(errno);
die_errno(_("renaming '%s' failed"), fname_old);
free(fname);
free(fname_old);
}
Expand All @@ -341,7 +341,8 @@ int cmd_repack(int argc, const char **argv, const char *prefix)
packdir,
item->string,
exts[ext]);
remove_path(fname);
if (remove_path(fname))
warning(_("removing '%s' failed"), fname);
}
}

Expand Down

0 comments on commit 0b63c6a

Please sign in to comment.