Skip to content

Commit 8580644

Browse files
derrickstoleegitster
authored andcommitted
commit-reach: cleanups in can_all_from_reach...
Due to a regression introduced by 4fbcca4 "commit-reach: make can_all_from_reach... linear" the series including b67f6b2 "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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4067a64 commit 8580644

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

commit-reach.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,8 @@ int can_all_from_reach_with_flag(struct object_array *from,
558558
from_one = deref_tag(the_repository, from_one,
559559
"a from object", 0);
560560
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
562563
* looking at the ancestry chain alone, so
563564
* leave a note to ourselves not to worry about
564565
* this object anymore.
@@ -622,10 +623,7 @@ int can_all_from_reach_with_flag(struct object_array *from,
622623
}
623624

624625
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);
629627
free(list);
630628

631629
for (i = 0; i < from->nr; i++)

0 commit comments

Comments
 (0)