@matheusbsbs / matheus-bagliano / commits / 31aea7ef77
Fork 0

Make clear_commit_marks() clean harder

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>

Rene Scharfe committed Jul 2, 2006 at 01:29 UTC 31aea7ef77aff64a02afe1ea5f10375565911808
1 file changed +3 -4
commit.c
+3 -4
@@ -397,13 +397,12 @@ void clear_commit_marks(struct commit *commit, unsigned int mark)
397 {
398 struct commit_list *parents;
399
400 + if (!commit)
401 + return;
402 parents = commit->parents;
403 commit->object.flags &= ~mark;
404 while (parents) {
403 - struct commit *parent = parents->item;
404 - if (parent && parent->object.parsed &&
405 - (parent->object.flags & mark))
406 - clear_commit_marks(parent, mark);
405 + clear_commit_marks(parents->item, mark);
406 parents = parents->next;
407 }
408 }