diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-02-27 15:11:50 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-27 15:11:50 -0800 |
| commit | aa95f87c740011f7d21555c5ad7f0870faf4b5c8 (patch) | |
| tree | c0a39d47a9577cde07467ee145fd7cd7de3c8126 /builtin/pack-objects.c | |
| parent | 341be27dfef8aba66f10be58aec1395075081e85 (diff) | |
| parent | 6375a00ef16071eadbb383bd9915e277ef304bfe (diff) | |
| download | git-aa95f87c740011f7d21555c5ad7f0870faf4b5c8.tar.xz | |
Merge branch 'ps/for-each-ref-in-fixes'
A handful of places used refs_for_each_ref_in() API incorrectly,
which has been corrected.
* ps/for-each-ref-in-fixes:
bisect: simplify string_list memory handling
bisect: fix misuse of `refs_for_each_ref_in()`
pack-bitmap: fix bug with exact ref match in "pack.preferBitmapTips"
pack-bitmap: deduplicate logic to iterate over preferred bitmap tips
Diffstat (limited to 'builtin/pack-objects.c')
| -rw-r--r-- | builtin/pack-objects.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index cfb03d4c09..433d77cf27 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -4561,22 +4561,6 @@ static int mark_bitmap_preferred_tip(const struct reference *ref, void *data UNU return 0; } -static void mark_bitmap_preferred_tips(void) -{ - struct string_list_item *item; - const struct string_list *preferred_tips; - - preferred_tips = bitmap_preferred_tips(the_repository); - if (!preferred_tips) - return; - - for_each_string_list_item(item, preferred_tips) { - refs_for_each_ref_in(get_main_ref_store(the_repository), - item->string, mark_bitmap_preferred_tip, - NULL); - } -} - static inline int is_oid_uninteresting(struct repository *repo, struct object_id *oid) { @@ -4717,7 +4701,8 @@ static void get_object_list(struct rev_info *revs, struct strvec *argv) load_delta_islands(the_repository, progress); if (write_bitmap_index) - mark_bitmap_preferred_tips(); + for_each_preferred_bitmap_tip(the_repository, mark_bitmap_preferred_tip, + NULL); if (!fn_show_object) fn_show_object = show_object; |
