userdiff: fix HTML hunk header regexp
[git/debian.git] / t / t5311-pack-bitmaps-shallow.sh
blob872a95df3383742e392ef3750be3dfcbecb01ec8
1 #!/bin/sh
3 test_description='check bitmap operation with shallow repositories'
4 . ./test-lib.sh
6 # We want to create a situation where the shallow, grafted
7 # view of reachability does not match reality in a way that
8 # might cause us to send insufficient objects.
10 # We do this with a history that repeats a state, like:
12 # A -- B -- C
13 # file=1 file=2 file=1
15 # and then create a shallow clone to the second commit, B.
16 # In a non-shallow clone, that would mean we already have
17 # the tree for A. But in a shallow one, we've grafted away
18 # A, and fetching A to B requires that the other side send
19 # us the tree for file=1.
20 test_expect_success 'setup shallow repo' '
21 echo 1 >file &&
22 git add file &&
23 git commit -m orig &&
24 echo 2 >file &&
25 git commit -a -m update &&
26 git clone --no-local --bare --depth=1 . shallow.git &&
27 echo 1 >file &&
28 git commit -a -m repeat
31 test_expect_success 'turn on bitmaps in the parent' '
32 git repack -adb
35 test_expect_success 'shallow fetch from bitmapped repo' '
36 (cd shallow.git && git fetch)
39 test_done