]> git.ipfire.org Git - thirdparty/git.git/blame - t/t5608-clone-2gb.sh
path.c: don't call the match function without value in trie_find()
[thirdparty/git.git] / t / t5608-clone-2gb.sh
CommitLineData
ca31f0b5
JS
1#!/bin/sh
2
3test_description='Test cloning a repository larger than 2 gigabyte'
4. ./test-lib.sh
5
2c7e134c
ÆAB
6if test -z "$GIT_TEST_CLONE_2GB"
7then
8 say 'Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t'
9else
10 test_set_prereq CLONE_2GB
11fi
ca31f0b5 12
2c7e134c 13test_expect_success CLONE_2GB 'setup' '
ca31f0b5
JS
14
15 git config pack.compression 0 &&
16 git config pack.depth 0 &&
c8b29645 17 blobsize=$((100*1024*1024)) &&
ca31f0b5
JS
18 blobcount=$((2*1024*1024*1024/$blobsize+1)) &&
19 i=1 &&
20 (while test $i -le $blobcount
21 do
22 printf "Generating blob $i/$blobcount\r" >&2 &&
23 printf "blob\nmark :$i\ndata $blobsize\n" &&
c680668d 24 #test-tool genrandom $i $blobsize &&
ca31f0b5 25 printf "%-${blobsize}s" $i &&
95005262 26 echo "M 100644 :$i $i" >> commit &&
ca31f0b5
JS
27 i=$(($i+1)) ||
28 echo $? > exit-status
29 done &&
30 echo "commit refs/heads/master" &&
31 echo "author A U Thor <author@email.com> 123456789 +0000" &&
32 echo "committer C O Mitter <committer@email.com> 123456789 +0000" &&
33 echo "data 5" &&
34 echo ">2gb" &&
35 cat commit) |
5eef828b 36 git fast-import --big-file-threshold=2 &&
ca31f0b5
JS
37 test ! -f exit-status
38
39'
40
2c7e134c 41test_expect_success CLONE_2GB 'clone - bare' '
ca31f0b5 42
c8b29645
RS
43 git clone --bare --no-hardlinks . clone-bare
44
45'
46
2c7e134c 47test_expect_success CLONE_2GB 'clone - with worktree, file:// protocol' '
c8b29645 48
f904f660 49 git clone "file://$(pwd)" clone-wt
ca31f0b5
JS
50
51'
52
53test_done