From: Rene Scharfe Date: Sat, 1 Jul 2006 23:29:58 +0000 (+0200) Subject: Make clear_commit_marks() clean harder X-Git-Tag: v1.4.2-rc1~77^2~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=31aea7ef77aff64a02afe1ea5f10375565911808;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/commit.c b/commit.c index 593414df3..70a4effe5 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; } }