summaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-07-18 12:20:30 -0700
committerJunio C Hamano <gitster@pobox.com>2018-07-18 12:20:30 -0700
commitad7b8a7c5af3d47b746c9347baca8d4521c9633d (patch)
tree2e0fd93a40591429ed025521e77bb7266666da8e /builtin/pack-objects.c
parenta4d4427bc6c9acefe7803d204b4bdca3cd4059a0 (diff)
parentf3c23db2d7e764b247f7d76a8d0ba180811e9525 (diff)
downloadgit-ad7b8a7c5af3d47b746c9347baca8d4521c9633d.tar.gz
Merge branch 'jt/remove-pack-bitmap-global'
The effort to move globals to per-repository in-core structure continues. * jt/remove-pack-bitmap-global: pack-bitmap: add free function pack-bitmap: remove bitmap_git global variable
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index 69d3d7b82a..ebc8cefb53 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -2929,11 +2929,13 @@ static int pack_options_allow_reuse(void)
static int get_object_list_from_bitmap(struct rev_info *revs)
{
- if (prepare_bitmap_walk(revs) < 0)
+ struct bitmap_index *bitmap_git;
+ if (!(bitmap_git = prepare_bitmap_walk(revs)))
return -1;
if (pack_options_allow_reuse() &&
!reuse_partial_packfile_from_bitmap(
+ bitmap_git,
&reuse_packfile,
&reuse_packfile_objects,
&reuse_packfile_offset)) {
@@ -2942,7 +2944,8 @@ static int get_object_list_from_bitmap(struct rev_info *revs)
display_progress(progress_state, nr_result);
}
- traverse_bitmap_commit_list(&add_object_entry_from_bitmap);
+ traverse_bitmap_commit_list(bitmap_git, &add_object_entry_from_bitmap);
+ free_bitmap_index(bitmap_git);
return 0;
}