Skip to content
/ git Public
forked from git/git

Commit

Permalink
Don't add parents to the commit list if we have already
Browse files Browse the repository at this point in the history
seen them.

Otherwise any merges will make the parent list explode.
  • Loading branch information
Linus Torvalds committed Apr 24, 2005
1 parent 6474510 commit 4056c09
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4056c09

Please sign in to comment.