Skip to content

Commit b3118a5

Browse files
avargitster
authored andcommitted
pack-bitmap-write.c: don't return without stop_progress()
Fix a bug that's been here since 7cc8f97 (pack-objects: implement bitmap writing, 2013-12-21), we did not call stop_progress() if we reached the early exit in this function. We could call stop_progress() before we return, but better yet is to defer calling start_progress() until we need it. For now this only matters in practice because we'd previously omit the "region_leave" for the progress trace2 event. Suggested-by: SZEDER Gábor <[email protected]> Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 74900a6 commit b3118a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pack-bitmap-write.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,15 +544,15 @@ void bitmap_writer_select_commits(struct commit **indexed_commits,
544544

545545
QSORT(indexed_commits, indexed_commits_nr, date_compare);
546546

547-
if (writer.show_progress)
548-
writer.progress = start_progress("Selecting bitmap commits", 0);
549-
550547
if (indexed_commits_nr < 100) {
551548
for (i = 0; i < indexed_commits_nr; ++i)
552549
push_bitmapped_commit(indexed_commits[i]);
553550
return;
554551
}
555552

553+
if (writer.show_progress)
554+
writer.progress = start_progress("Selecting bitmap commits", 0);
555+
556556
for (;;) {
557557
struct commit *chosen = NULL;
558558

0 commit comments

Comments
 (0)