]>
Commit | Line | Data |
---|---|---|
9308f45a JS |
1 | #!/bin/sh |
2 | # | |
3 | # Copyright (c) 2018 Johannes Schindelin | |
4 | # | |
5 | ||
6 | test_description='git pack-object with "large" deltas | |
7 | ||
8 | ' | |
330ca850 ÆAB |
9 | |
10 | TEST_PASSES_SANITIZE_LEAK=true | |
9308f45a JS |
11 | . ./test-lib.sh |
12 | . "$TEST_DIRECTORY"/lib-pack.sh | |
13 | ||
14 | # Two similar-ish objects that we have computed deltas between. | |
e70649bb | 15 | A=$(test_oid packlib_7_0) |
16 | B=$(test_oid packlib_7_76) | |
9308f45a JS |
17 | |
18 | test_expect_success 'setup' ' | |
19 | clear_packs && | |
20 | { | |
21 | pack_header 2 && | |
22 | pack_obj $A $B && | |
23 | pack_obj $B | |
24 | } >ab.pack && | |
25 | pack_trailer ab.pack && | |
26 | git index-pack --stdin <ab.pack | |
27 | ' | |
28 | ||
34204c81 | 29 | test_expect_success 'repack large deltas' ' |
9308f45a JS |
30 | printf "%s\\n" $A $B | |
31 | GIT_TEST_OE_DELTA_SIZE=2 git pack-objects tmp-pack | |
32 | ' | |
33 | ||
34 | test_done |