Code

reflog-walk: refactor the branch@{num} formatting
[git.git] / builtin-rev-list.c
index 31ea5f4aac4559a69ed5b0033696fff2333f5e5a..42cc8d8872afbc1302f14e089db430014330f7c3 100644 (file)
@@ -96,9 +96,10 @@ static void show_commit(struct commit *commit, void *data)
 
        if (revs->verbose_header && commit->buffer) {
                struct strbuf buf = STRBUF_INIT;
-               pretty_print_commit(revs->commit_format, commit,
-                                   &buf, revs->abbrev, NULL, NULL,
-                                   revs->date_mode, 0);
+               struct pretty_print_context ctx = {0};
+               ctx.abbrev = revs->abbrev;
+               ctx.date_mode = revs->date_mode;
+               pretty_print_commit(revs->commit_format, commit, &buf, &ctx);
                if (revs->graph) {
                        if (buf.len) {
                                if (revs->commit_format != CMIT_FMT_ONELINE)
@@ -262,7 +263,9 @@ int show_bisect_vars(struct rev_list_info *info, int reaches, int all)
        if (!revs->commits && !(flags & BISECT_SHOW_TRIED))
                return 1;
 
-       revs->commits = filter_skipped(revs->commits, &tried, flags & BISECT_SHOW_ALL);
+       revs->commits = filter_skipped(revs->commits, &tried,
+                                      flags & BISECT_SHOW_ALL,
+                                      NULL, NULL);
 
        /*
         * revs->commits can reach "reaches" commits among