Merge branch 'ab/ref-filter-no-contains' into next
[gitweb.git] / builtin / rev-list.c
index 53a746dd891419f01d7c26b4b783a3b0142c26d2..95b4128250c850eb130fbdfea2407bad819a85b8 100644 (file)
@@ -123,6 +123,7 @@ static void show_commit(struct commit *commit, void *data)
                ctx.date_mode_explicit = revs->date_mode_explicit;
                ctx.fmt = revs->commit_format;
                ctx.output_encoding = get_log_output_encoding();
+               ctx.color = revs->diffopt.use_color;
                pretty_print_commit(&ctx, commit, &buf);
                if (buf.len) {
                        if (revs->commit_format != CMIT_FMT_ONELINE)
@@ -351,7 +352,8 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
 
        if ((!revs.commits && reflog_walk_empty(revs.reflog_info) &&
             (!(revs.tag_objects || revs.tree_objects || revs.blob_objects) &&
-             !revs.pending.nr)) ||
+             !revs.pending.nr) &&
+            !revs.rev_input_given) ||
            revs.diff)
                usage(rev_list_usage);