]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-prune.c
Fix some printf format warnings
[thirdparty/git.git] / builtin-prune.c
index 545e9c1f9458ed936e2a99a208f75b70f368294c..8459aec8e8ea9d24a13448cf950d2e160361fd9d 100644 (file)
@@ -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;
 }
 
@@ -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++;