]>
Commit | Line | Data |
---|---|---|
4dd1fbc7 JH |
1 | #!/bin/sh |
2 | # Copyright (c) 2011, Google Inc. | |
3 | ||
4 | test_description='adding and checking out large blobs' | |
5 | ||
6 | . ./test-lib.sh | |
7 | ||
8 | test_expect_success setup ' | |
9 | git config core.bigfilethreshold 200k && | |
10 | echo X | dd of=large bs=1k seek=2000 | |
11 | ' | |
12 | ||
13 | test_expect_success 'add a large file' ' | |
14 | git add large && | |
15 | # make sure we got a packfile and no loose objects | |
16 | test -f .git/objects/pack/pack-*.pack && | |
17 | test ! -f .git/objects/??/?????????????????????????????????????? | |
18 | ' | |
19 | ||
20 | test_expect_success 'checkout a large file' ' | |
21 | large=$(git rev-parse :large) && | |
22 | git update-index --add --cacheinfo 100644 $large another && | |
23 | git checkout another && | |
24 | cmp large another ;# this must not be test_cmp | |
25 | ' | |
26 | ||
27 | test_done |