Log message printout cleanups (#3): fix --pretty=oneline
[git.git] / revision.c
index 9693b6e..5abec18 100644 (file)
@@ -380,6 +380,9 @@ static void add_parents_to_list(struct rev_info *revs, struct commit *commit, st
        if (revs->prune_fn)
                revs->prune_fn(revs, commit);
 
+       if (revs->no_walk)
+               return;
+
        parent = commit->parents;
        while (parent) {
                struct commit *p = parent->item;
@@ -495,7 +498,6 @@ void init_revisions(struct rev_info *revs)
        revs->topo_setter = topo_sort_default_setter;
        revs->topo_getter = topo_sort_default_getter;
 
-       revs->header_prefix = "";
        revs->commit_format = CMIT_FMT_DEFAULT;
 
        diff_setup(&revs->diffopt);
@@ -672,12 +674,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
                        }
                        if (!strcmp(arg, "-v")) {
                                revs->verbose_header = 1;
-                               revs->header_prefix = "diff-tree ";
                                continue;
                        }
                        if (!strncmp(arg, "--pretty", 8)) {
                                revs->verbose_header = 1;
-                               revs->header_prefix = "diff-tree ";
                                revs->commit_format = get_commit_format(arg+8);
                                continue;
                        }
@@ -816,6 +816,8 @@ void prepare_revision_walk(struct rev_info *revs)
                list = list->next;
        }
 
+       if (revs->no_walk)
+               return;
        if (revs->limited)
                limit_list(revs);
        if (revs->topo_order)