commit-reach: cleanups in can_all_from_reach...
Due to a regression introduced by 4fbcca4e "commit-reach: make can_all_from_reach... linear" the series including b67f6b26 "commit-reach: properly peel tags" was merged to master quickly. There were a few more cleanups left to apply in the series, which are included by this change: 1. Clean up a comment that is in the incorrect style. 2. Replace multiple calls to clear_commit_marks() with one call to clear_commit_marks_many(). Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Derrick Stolee committed
Sep 25, 2018 at 13:27 UTC
85806440b165ba41953f9faf31ad29d5cc45cb0a
1 file changed
+3
-5
commit-reach.c
+3
-5
@@ -558,7 +558,8 @@ int can_all_from_reach_with_flag(struct object_array *from,
558
from_one = deref_tag(the_repository, from_one,
559
"a from object", 0);
560
if (!from_one || from_one->type != OBJ_COMMIT) {
561
- /* no way to tell if this is reachable by
561
+ /*
562
+ * no way to tell if this is reachable by
563
* looking at the ancestry chain alone, so
564
* leave a note to ourselves not to worry about
565
* this object anymore.
@@ -622,10 +623,7 @@ int can_all_from_reach_with_flag(struct object_array *from,
623
}
624
625
cleanup:
625
- for (i = 0; i < nr_commits; i++) {
626
- clear_commit_marks(list[i], RESULT);
627
- clear_commit_marks(list[i], assign_flag);
628
- }
626
+ clear_commit_marks_many(nr_commits, list, RESULT | assign_flag);
627
free(list);
628
629
for (i = 0; i < from->nr; i++)