log --graph --stat: three-dash separator should come after graph lines
authorLucian Poston <lucian.poston@gmail.com>
Tue, 20 Mar 2012 08:05:34 +0000 (01:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Mar 2012 19:08:30 +0000 (12:08 -0700)
Output from "git log --graph --stat -p" emits the three-dash separator
line before the graph that shows ancestry lines.  The separator should
come after the ancestry lines just like all the other output.

Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
log-tree.c

index 24c295ea1dc91180b9685299f48812593162bdfe..f962203ec5527b4d6cac6d05abad61134b38897c 100644 (file)
@@ -570,14 +570,15 @@ int log_tree_diff_flush(struct rev_info *opt)
                    opt->verbose_header &&
                    opt->commit_format != CMIT_FMT_ONELINE) {
                        int pch = DIFF_FORMAT_DIFFSTAT | DIFF_FORMAT_PATCH;
-                       if ((pch & opt->diffopt.output_format) == pch)
-                               printf("---");
                        if (opt->diffopt.output_prefix) {
                                struct strbuf *msg = NULL;
                                msg = opt->diffopt.output_prefix(&opt->diffopt,
                                        opt->diffopt.output_prefix_data);
                                fwrite(msg->buf, msg->len, 1, stdout);
                        }
+                       if ((pch & opt->diffopt.output_format) == pch) {
+                               printf("---");
+                       }
                        putchar('\n');
                }
        }