summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorRene Scharfe <rene.scharfe@lsrfire.ath.cx>2006-07-01 23:29:58 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-02 01:14:03 (GMT)
commit31aea7ef77aff64a02afe1ea5f10375565911808 (patch)
tree53f52d629e9843da331e56dd50e9568c6dbf029f /commit.c
parent0d2c9d67d9e1a2fd87b2daeefffffaff0b3f3a49 (diff)
downloadgit-31aea7ef77aff64a02afe1ea5f10375565911808.zip
git-31aea7ef77aff64a02afe1ea5f10375565911808.tar.gz
git-31aea7ef77aff64a02afe1ea5f10375565911808.tar.bz2
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>
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/commit.c b/commit.c
index 593414d..70a4eff 100644
--- a/commit.c
+++ b/commit.c
@@ -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;
}
}