aboutsummaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-23 19:21:28 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-23 19:21:28 -0700
commit4056c09114e66ce3c2368551f0122e83628750d6 (patch)
tree34933617a2e8284ffca6ab2a1b2f00d6996a58e7 /commit.c
parent64745109c41a5c4a66b9e3df6bca2fd4abf60d48 (diff)
downloadgit-4056c09114e66ce3c2368551f0122e83628750d6.tar.gz
git-4056c09114e66ce3c2368551f0122e83628750d6.tar.xz
Don't add parents to the commit list if we have already
seen them. Otherwise any merges will make the parent list explode.
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index 911f6435a..0243e77cb 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;