| 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-lib.sh |
| 11 | . "$TEST_DIRECTORY"/lib-pack.sh |
| 12 | |
| 13 | # Two similar-ish objects that we have computed deltas between. |
| 14 | A=$(test_oid packlib_7_0) |
| 15 | B=$(test_oid packlib_7_76) |
| 16 | |
| 17 | test_expect_success 'setup' ' |
| 18 | clear_packs && |
| 19 | { |
| 20 | pack_header 2 && |
| 21 | pack_obj $A $B && |
| 22 | pack_obj $B |
| 23 | } >ab.pack && |
| 24 | pack_trailer ab.pack && |
| 25 | git index-pack --stdin <ab.pack |
| 26 | ' |
| 27 | |
| 28 | test_expect_success 'repack large deltas' ' |
| 29 | printf "%s\\n" $A $B | |
| 30 | GIT_TEST_OE_DELTA_SIZE=2 git pack-objects tmp-pack |
| 31 | ' |
| 32 | |
| 33 | test_done |