Merge branch 'js/rebase-stat-unrelated-fix'
[gitweb.git] / builtin / prune.c
index 4916a4daa264ee695dbfbde81dbd8ef0072ac9c4..e42653b99cffe2f42f2fb853999a41465878ce02 100644 (file)
@@ -120,7 +120,8 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
        save_commit_buffer = 0;
        read_replace_refs = 0;
        ref_paranoia = 1;
-       init_revisions(&revs, prefix);
+       revs.allow_exclude_promisor_objects_opt = 1;
+       repo_init_revisions(the_repository, &revs, prefix);
 
        argc = parse_options(argc, argv, prefix, options, prune_usage, 0);
 
@@ -161,7 +162,7 @@ int cmd_prune(int argc, const char **argv, const char *prefix)
        free(s);
 
        if (is_repository_shallow(the_repository))
-               prune_shallow(show_only);
+               prune_shallow(show_only ? PRUNE_SHOW_ONLY : 0);
 
        return 0;
 }