diff options
| author | Jeff King <peff@peff.net> | 2020-02-14 13:22:41 -0500 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-02-14 10:46:22 -0800 |
| commit | 3ab3185f999f5d0d0079ac8246edb8fca5d9d3fd (patch) | |
| tree | 33cd254d4fb4370094a56e98785ebd27f780c99e /builtin | |
| parent | 84243da1298890bd7370df66b754c2b252a08346 (diff) | |
| download | git-3ab3185f999f5d0d0079ac8246edb8fca5d9d3fd.tar.gz | |
pack-objects: support filters with bitmaps
Just as rev-list recently learned to combine filters and bitmaps, let's
do the same for pack-objects. The infrastructure is all there; we just
need to pass along our filter options, and the pack-bitmap code will
decide to use bitmaps or not.
This unsurprisingly makes things faster for partial clones of large
repositories (here we're cloning linux.git):
Test HEAD^ HEAD
------------------------------------------------------------------------------
5310.11: simulated partial clone 38.94(37.28+5.87) 11.06(11.27+4.07) -71.6%
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/pack-objects.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 2bb81c2133..6bc9bc1ce2 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -3040,7 +3040,7 @@ static int pack_options_allow_reuse(void) static int get_object_list_from_bitmap(struct rev_info *revs) { - if (!(bitmap_git = prepare_bitmap_walk(revs, NULL))) + if (!(bitmap_git = prepare_bitmap_walk(revs, &filter_options))) return -1; if (pack_options_allow_reuse() && @@ -3419,7 +3419,6 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) if (filter_options.choice) { if (!pack_to_stdout) die(_("cannot use --filter without --stdout")); - use_bitmap_index = 0; } /* |
