diff options
| author | Junio C Hamano <gitster@pobox.com> | 2026-02-20 10:09:32 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-20 10:09:32 -0800 |
| commit | 4fa8cfd68ab9ed6fb273a354ff1b5e240cbabc1d (patch) | |
| tree | 727bb838a214bbdda297fbe6125b270edc4169c5 /builtin | |
| parent | 73fd77805fc6406f31c36212846d9e2541d19321 (diff) | |
| parent | 6375a00ef16071eadbb383bd9915e277ef304bfe (diff) | |
| download | git-4fa8cfd68ab9ed6fb273a354ff1b5e240cbabc1d.tar.xz | |
Merge branch 'ps/for-each-ref-in-fixes' into ps/refs-for-each
* 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')
| -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 e6c8f896ab..c2ce70db04 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -4551,22 +4551,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) { @@ -4707,7 +4691,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; |
