Merge branch 'rs/clear-commit-marks-cleanup'

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 2022-12-26 11:42:05 +09:00
commit c637bd230d

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;
}