зеркало из https://github.com/microsoft/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 <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Родитель
0d2c9d67d9
Коммит
31aea7ef77
7
commit.c
7
commit.c
|
@ -397,13 +397,12 @@ void clear_commit_marks(struct commit *commit, unsigned int mark)
|
||||||
{
|
{
|
||||||
struct commit_list *parents;
|
struct commit_list *parents;
|
||||||
|
|
||||||
|
if (!commit)
|
||||||
|
return;
|
||||||
parents = commit->parents;
|
parents = commit->parents;
|
||||||
commit->object.flags &= ~mark;
|
commit->object.flags &= ~mark;
|
||||||
while (parents) {
|
while (parents) {
|
||||||
struct commit *parent = parents->item;
|
clear_commit_marks(parents->item, mark);
|
||||||
if (parent && parent->object.parsed &&
|
|
||||||
(parent->object.flags & mark))
|
|
||||||
clear_commit_marks(parent, mark);
|
|
||||||
parents = parents->next;
|
parents = parents->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче