summaryrefslogtreecommitdiff
path: root/pack-bitmap-write.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-02-25 23:47:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-02-25 23:47:35 (GMT)
commita47fcfe8712e3258d1c565cd654c9bd5312a5168 (patch)
tree4c724f397e890c6b233d253be279321505e2a3a4 /pack-bitmap-write.c
parent6249ce2d1b9b60e7aa630d370e68c87ef6331629 (diff)
parentb3118a56f99ca0ec872b84dc760a0dc778f3890e (diff)
downloadgit-a47fcfe8712e3258d1c565cd654c9bd5312a5168.zip
git-a47fcfe8712e3258d1c565cd654c9bd5312a5168.tar.gz
git-a47fcfe8712e3258d1c565cd654c9bd5312a5168.tar.bz2
Merge branch 'ab/only-single-progress-at-once'
Further tweaks on progress API. * ab/only-single-progress-at-once: pack-bitmap-write.c: don't return without stop_progress() progress API: unify stop_progress{,_msg}(), fix trace2 bug progress.c: refactor stop_progress{,_msg}() to use helpers progress.c: use dereferenced "progress" variable, not "(*p_progress)" progress.h: format and be consistent with progress.c naming progress.c tests: test some invalid usage progress.c tests: make start/stop commands on stdin progress.c test helper: add missing braces leak tests: fix a memory leak in "test-progress" helper
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r--pack-bitmap-write.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index 9c55c15..cab3eaa 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -575,15 +575,15 @@ void bitmap_writer_select_commits(struct commit **indexed_commits,
QSORT(indexed_commits, indexed_commits_nr, date_compare);
- if (writer.show_progress)
- writer.progress = start_progress("Selecting bitmap commits", 0);
-
if (indexed_commits_nr < 100) {
for (i = 0; i < indexed_commits_nr; ++i)
push_bitmapped_commit(indexed_commits[i]);
return;
}
+ if (writer.show_progress)
+ writer.progress = start_progress("Selecting bitmap commits", 0);
+
for (;;) {
struct commit *chosen = NULL;