aboutsummaryrefslogtreecommitdiffstats
path: root/pack-bitmap-write.c
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2024-05-14 15:57:00 -0400
committerJunio C Hamano <gitster@pobox.com>2024-05-15 06:52:32 -0700
commit9675b0691732d5475a353a69c3a8e14804b22a64 (patch)
treedda533669a2d31605801041dd205d4385f17dbb7 /pack-bitmap-write.c
parentpack-bitmap: avoid use of static `bitmap_writer` (diff)
downloadgit-9675b0691732d5475a353a69c3a8e14804b22a64.tar.gz
git-9675b0691732d5475a353a69c3a8e14804b22a64.zip
pack-bitmap: drop unused `max_bitmaps` parameter
The `max_bitmaps` parameter in `bitmap_writer_select_commits()` was introduced back in 7cc8f97108 (pack-objects: implement bitmap writing, 2013-12-21), making it original to the bitmap implementation in Git itself. When that patch was merged via 0f9e62e084 (Merge branch 'jk/pack-bitmap', 2014-02-27), its sole caller in builtin/pack-objects.c passed a value of "-1" for `max_bitmaps`, indicating no limit. Since then, the only other caller (in midx.c, added via c528e17966 (pack-bitmap: write multi-pack bitmaps, 2021-08-31)) also uses a value of "-1" for `max_bitmaps`. Since no callers have needed a finite limit for the `max_bitmaps` parameter in the nearly decade that has passed since 0f9e62e084, let's remove the parameter and any dead pieces of code connected to it. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r--pack-bitmap-write.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index e22fa70745..c0087dab12 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -587,8 +587,7 @@ static int date_compare(const void *_a, const void *_b)
void bitmap_writer_select_commits(struct bitmap_writer *writer,
struct commit **indexed_commits,
- unsigned int indexed_commits_nr,
- int max_bitmaps)
+ unsigned int indexed_commits_nr)
{
unsigned int i = 0, j, next;
@@ -611,11 +610,6 @@ void bitmap_writer_select_commits(struct bitmap_writer *writer,
if (i + next >= indexed_commits_nr)
break;
- if (max_bitmaps > 0 && writer->selected_nr >= max_bitmaps) {
- writer->selected_nr = max_bitmaps;
- break;
- }
-
if (next == 0) {
chosen = indexed_commits[i];
} else {