exclude-promisor-objects: declare when option is allowed
[gitweb.git] / builtin / rev-list.c
index 48300d9e11733396610e81fbb00ee7d17a7dba66..c8f3ac8d0927e67ea913299bc26173d870d7b29c 100644 (file)
@@ -134,7 +134,7 @@ static void show_commit(struct commit *commit, void *data)
        else
                putchar('\n');
 
-       if (revs->verbose_header && get_cached_commit_buffer(commit, NULL)) {
+       if (revs->verbose_header) {
                struct strbuf buf = STRBUF_INIT;
                struct pretty_print_context ctx = {0};
                ctx.abbrev = revs->abbrev;
@@ -370,6 +370,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
        git_config(git_default_config, NULL);
        init_revisions(&revs, prefix);
        revs.abbrev = DEFAULT_ABBREV;
+       revs.allow_exclude_promisor_objects_opt = 1;
        revs.commit_format = CMIT_FMT_UNSPECIFIED;
 
        /*
@@ -536,7 +537,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
                mark_edges_uninteresting(&revs, show_edge);
 
        if (bisect_list) {
-               int reaches = reaches, all = all;
+               int reaches, all;
 
                find_bisection(&revs.commits, &reaches, &all, bisect_find_all);