rev-list: use bitmap filters for traversal
[git] / t / t6113-rev-list-bitmap-filters.sh
1 #!/bin/sh
2
3 test_description='rev-list combining bitmaps and filters'
4 . ./test-lib.sh
5
6 test_expect_success 'set up bitmapped repo' '
7         # one commit will have bitmaps, the other will not
8         test_commit one &&
9         git repack -adb &&
10         test_commit two
11 '
12
13 test_expect_success 'filters fallback to non-bitmap traversal' '
14         # use a path-based filter, since they are inherently incompatible with
15         # bitmaps (i.e., this test will never get confused by later code to
16         # combine the features)
17         filter=$(echo "!one" | git hash-object -w --stdin) &&
18         git rev-list --objects --filter=sparse:oid=$filter HEAD >expect &&
19         git rev-list --use-bitmap-index \
20                      --objects --filter=sparse:oid=$filter HEAD >actual &&
21         test_cmp expect actual
22 '
23
24 test_done