3 test_description='rev-list combining bitmaps and filters'
6 test_expect_success 'set up bitmapped repo' '
7 # one commit will have bitmaps, the other will not
9 test_commit much-larger-blob-one &&
12 test_commit much-larger-blob-two
15 test_expect_success 'filters fallback to non-bitmap traversal' '
16 # use a path-based filter, since they are inherently incompatible with
17 # bitmaps (i.e., this test will never get confused by later code to
18 # combine the features)
19 filter=$(echo "!one" | git hash-object -w --stdin) &&
20 git rev-list --objects --filter=sparse:oid=$filter HEAD >expect &&
21 git rev-list --use-bitmap-index \
22 --objects --filter=sparse:oid=$filter HEAD >actual &&
23 test_cmp expect actual
26 test_expect_success 'blob:none filter' '
27 git rev-list --objects --filter=blob:none HEAD >expect &&
28 git rev-list --use-bitmap-index \
29 --objects --filter=blob:none HEAD >actual &&
30 test_bitmap_traversal expect actual
33 test_expect_success 'blob:none filter with specified blob' '
34 git rev-list --objects --filter=blob:none HEAD HEAD:two.t >expect &&
35 git rev-list --use-bitmap-index \
36 --objects --filter=blob:none HEAD HEAD:two.t >actual &&
37 test_bitmap_traversal expect actual
40 test_expect_success 'blob:limit filter' '
41 git rev-list --objects --filter=blob:limit=5 HEAD >expect &&
42 git rev-list --use-bitmap-index \
43 --objects --filter=blob:limit=5 HEAD >actual &&
44 test_bitmap_traversal expect actual
47 test_expect_success 'blob:limit filter with specified blob' '
48 git rev-list --objects --filter=blob:limit=5 \
49 HEAD HEAD:much-larger-blob-two.t >expect &&
50 git rev-list --use-bitmap-index \
51 --objects --filter=blob:limit=5 \
52 HEAD HEAD:much-larger-blob-two.t >actual &&
53 test_bitmap_traversal expect actual