]> git.ipfire.org Git - thirdparty/git.git/blob - t/t5321-pack-large-objects.sh
The third batch
[thirdparty/git.git] / t / t5321-pack-large-objects.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2018 Johannes Schindelin
4 #
5
6 test_description='git pack-object with "large" deltas
7
8 '
9
10 TEST_PASSES_SANITIZE_LEAK=true
11 . ./test-lib.sh
12 . "$TEST_DIRECTORY"/lib-pack.sh
13
14 # Two similar-ish objects that we have computed deltas between.
15 A=$(test_oid packlib_7_0)
16 B=$(test_oid packlib_7_76)
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
29 test_expect_success 'repack large deltas' '
30 printf "%s\\n" $A $B |
31 GIT_TEST_OE_DELTA_SIZE=2 git pack-objects tmp-pack
32 '
33
34 test_done