(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'Test cloning a repository larger than 2 gigabyte'>)} spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [(C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$GIT_TEST_CLONE_2GB'))})] ) action: [ (C {<say>} {(SQ <'Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t'>)}) ] spids: [14 24] ) ] else_action: [(C {<test_set_prereq>} {<CLONE_2GB>})] ) (C {<test_expect_success>} {<CLONE_2GB>} {(SQ <setup>)} { (SQ <'\n'> <'\n'> <'\tgit config pack.compression 0 &&\n'> <'\tgit config pack.depth 0 &&\n'> <'\tblobsize=$((100*1024*1024)) &&\n'> <'\tblobcount=$((2*1024*1024*1024/$blobsize+1)) &&\n'> <'\ti=1 &&\n'> <'\t(while test $i -le $blobcount\n'> <'\t do\n'> <'\t\tprintf "Generating blob $i/$blobcount\\r" >&2 &&\n'> <'\t\tprintf "blob\\nmark :$i\\ndata $blobsize\\n" &&\n'> <'\t\t#test-genrandom $i $blobsize &&\n'> <'\t\tprintf "%-${blobsize}s" $i &&\n'> <'\t\techo "M 100644 :$i $i" >> commit\n'> <'\t\ti=$(($i+1)) ||\n'> <'\t\techo $? > exit-status\n'> <'\t done &&\n'> <'\t echo "commit refs/heads/master" &&\n'> <'\t echo "author A U Thor <author@email.com> 123456789 +0000" &&\n'> <'\t echo "committer C O Mitter <committer@email.com> 123456789 +0000" &&\n'> <'\t echo "data 5" &&\n'> <'\t echo ">2gb" &&\n'> <'\t cat commit) |\n'> <'\tgit fast-import --big-file-threshold=2 &&\n'> <'\ttest ! -f exit-status\n'> <'\n'> ) } ) (C {<test_expect_success>} {<CLONE_2GB>} {(SQ <'clone - bare'>)} {(SQ <'\n'> <'\n'> <'\tgit clone --bare --no-hardlinks . clone-bare\n'> <'\n'>)} ) (C {<test_expect_success>} {<CLONE_2GB>} {(SQ <'clone - with worktree, file:// protocol'>)} {(SQ <'\n'> <'\n'> <'\tgit clone "file://$(pwd)" clone-wt\n'> <'\n'>)} ) (C {<test_done>}) ] )