Merge branch 'rs/clear-commit-marks-cleanup' into maint-2.39

Code clean-up.

* rs/clear-commit-marks-cleanup:
  commit: skip already cleared parents in clear_commit_marks_1()
This commit is contained in:
Junio C Hamano 2023-02-14 14:15:56 -08:00
commit dfd37b70b1

View File

@ -701,8 +701,10 @@ static void clear_commit_marks_1(struct commit_list **plist,
if (!parents)
return;
while ((parents = parents->next))
commit_list_insert(parents->item, plist);
while ((parents = parents->next)) {
if (parents->item->object.flags & mark)
commit_list_insert(parents->item, plist);
}
commit = commit->parents->item;
}