From 4056c09114e66ce3c2368551f0122e83628750d6 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 23 Apr 2005 19:21:28 -0700 Subject: [PATCH] Don't add parents to the commit list if we have already seen them. Otherwise any merges will make the parent list explode. --- commit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/commit.c b/commit.c index 911f6435..0243e77c 100644 --- a/commit.c +++ b/commit.c @@ -124,8 +124,11 @@ struct commit *pop_most_recent_commit(struct commit_list **list) free(old); while (parents) { - parse_commit(parents->item); - insert_by_date(list, parents->item); + struct commit *commit = parents->item; + if (!commit->object.parsed) { + parse_commit(commit); + insert_by_date(list, commit); + } parents = parents->next; } return ret; -- 2.11.0