Signed-off-by: Bo Yang <struggleyb.nku@xxxxxxxxx> --- line.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/line.c b/line.c index bc9fc76..5782003 100644 --- a/line.c +++ b/line.c @@ -1023,8 +1023,6 @@ static void assign_parents_range(struct rev_info *rev, struct commit *commit) * be an evil merge. */ copy = diff_line_range_clone_deeply(r); - /* Never print out any diff for a merge commit */ - commit->object.flags &= ~NEED_PRINT; parents = commit->parents; while (parents) { struct commit *p = parents->item; @@ -1059,6 +1057,8 @@ static void assign_parents_range(struct rev_info *rev, struct commit *commit) commit->parents = parents; parents = parents->next; commit->parents->next = NULL; + + /* free the non-use commit_list */ while (parents) { struct commit_list *list = parents; parents = parents->next; @@ -1084,6 +1084,9 @@ static void assign_parents_range(struct rev_info *rev, struct commit *commit) } out: + /* Never print out any diff for a merge commit */ + commit->object.flags &= ~NEED_PRINT; + parents = commit->parents; while (parents) { state = lookup_decoration(&parents_state, &parents->item->object); -- 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