Skip to content

Commit

Permalink
Make clear_commit_marks() clean harder
Browse files Browse the repository at this point in the history
Don't care if objects have been parsed or not and don't stop when we
reach a commit that is already clean -- its parents could be dirty.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Rene Scharfe authored and Junio C Hamano committed Jul 2, 2006
1 parent 0d2c9d6 commit 31aea7e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,12 @@ void clear_commit_marks(struct commit *commit, unsigned int mark)
{
struct commit_list *parents;

if (!commit)
return;
parents = commit->parents;
commit->object.flags &= ~mark;
while (parents) {
struct commit *parent = parents->item;
if (parent && parent->object.parsed &&
(parent->object.flags & mark))
clear_commit_marks(parent, mark);
clear_commit_marks(parents->item, mark);
parents = parents->next;
}
}
Expand Down

0 comments on commit 31aea7e

Please sign in to comment.