Code

Avoid segfault with 'git branch' when the HEAD is detached
[git.git] / builtin-rev-list.c
index facaff288dba2789f0637c4554bd130440e2a3da..436afa45f5b7569551aa8301aee8a0752009a900 100644 (file)
@@ -100,15 +100,14 @@ static void show_commit(struct commit *commit)
                        children = children->next;
                }
        }
-       show_decorations(commit);
+       show_decorations(&revs, commit);
        if (revs.commit_format == CMIT_FMT_ONELINE)
                putchar(' ');
        else
                putchar('\n');
 
        if (revs.verbose_header && commit->buffer) {
-               struct strbuf buf;
-               strbuf_init(&buf, 0);
+               struct strbuf buf = STRBUF_INIT;
                pretty_print_commit(revs.commit_format, commit,
                                    &buf, revs.abbrev, NULL, NULL,
                                    revs.date_mode, 0);
@@ -609,6 +608,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
                if (!strcmp(arg, "--bisect-all")) {
                        bisect_list = 1;
                        bisect_find_all = 1;
+                       revs.show_decorations = 1;
                        continue;
                }
                if (!strcmp(arg, "--bisect-vars")) {