Signed-off-by: Bo Yang <struggleyb.nku@xxxxxxxxx> --- line.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/line.c b/line.c index c8c9ad3..ca8980d 100644 --- a/line.c +++ b/line.c @@ -975,13 +975,15 @@ static void assign_parents_range(struct rev_info *rev, struct commit *commit) parents = parents->next; } + /* Never print out any diff for a merge commit */ + commit->object.flags &= ~NEED_PRINT; /* * yes, this must be an evil merge. */ range = copy; while (range) { if (range->nr) { - commit->object.flags |= NEED_PRINT | EVIL_MERGE; + commit->object.flags |= EVIL_MERGE; nontrivial = 1; } range = range->next; @@ -1256,7 +1258,8 @@ static void line_log_flush(struct rev_info *rev, struct commit *c) char *line_prefix = ""; struct strbuf *msgbuf; - if (range == NULL) + if (range == NULL || ! (c->object.flags & EVIL_MERGE || + c->object.flags & NEED_PRINT)) return; log.commit = c; @@ -1310,7 +1313,9 @@ int cmd_line_log_walk(struct rev_info *rev) assign_parents_range(rev, commit); } - if (commit->object.flags & NEED_PRINT || rev->full_line_diff || rev->graph) { + if (commit->object.flags & NEED_PRINT || + commit->object.flags & EVIL_MERGE || + rev->full_line_diff || rev->graph) { if (rev->graph) graph_update(rev->graph, commit); line_log_flush(rev, commit); -- 1.7.0.2.273.gc2413.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html