diff options
Diffstat (limited to 'builtin-prune.c')
-rw-r--r-- | builtin-prune.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/builtin-prune.c b/builtin-prune.c index 545e9c1f94..4675f6054f 100644 --- a/builtin-prune.c +++ b/builtin-prune.c @@ -27,7 +27,7 @@ static int prune_tmp_object(const char *path, const char *filename) } printf("Removing stale temporary file %s\n", fullpath); if (!show_only) - unlink(fullpath); + unlink_or_warn(fullpath); return 0; } @@ -47,7 +47,7 @@ static int prune_object(char *path, const char *filename, const unsigned char *s (type > 0) ? typename(type) : "unknown"); } if (!show_only) - unlink(fullpath); + unlink_or_warn(fullpath); return 0; } @@ -106,7 +106,7 @@ static void prune_object_dir(const char *path) /* * Write errors (particularly out of space) can result in * failed temporary packs (and more rarely indexes and other - * files begining with "tmp_") accumulating in the object + * files beginning with "tmp_") accumulating in the object * and the pack directories. */ static void remove_temporary_files(const char *path) @@ -140,9 +140,10 @@ int cmd_prune(int argc, const char **argv, const char *prefix) char *s; save_commit_buffer = 0; + read_replace_refs = 0; init_revisions(&revs, prefix); - argc = parse_options(argc, argv, options, prune_usage, 0); + argc = parse_options(argc, argv, prefix, options, prune_usage, 0); while (argc--) { unsigned char sha1[20]; const char *name = *argv++; |