t / t5705-clone-2gb.shon commit bash completion: Support "divergence from upstream" messages in __git_ps1 (6d158cb)
   1#!/bin/sh
   2
   3test_description='Test cloning a repository larger than 2 gigabyte'
   4. ./test-lib.sh
   5
   6test -z "$GIT_TEST_CLONE_2GB" &&
   7say "Skipping expensive 2GB clone test; enable it with GIT_TEST_CLONE_2GB=t" &&
   8test_done &&
   9exit
  10
  11test_expect_success 'setup' '
  12
  13        git config pack.compression 0 &&
  14        git config pack.depth 0 &&
  15        blobsize=$((100*1024*1024)) &&
  16        blobcount=$((2*1024*1024*1024/$blobsize+1)) &&
  17        i=1 &&
  18        (while test $i -le $blobcount
  19         do
  20                printf "Generating blob $i/$blobcount\r" >&2 &&
  21                printf "blob\nmark :$i\ndata $blobsize\n" &&
  22                #test-genrandom $i $blobsize &&
  23                printf "%-${blobsize}s" $i &&
  24                echo "M 100644 :$i $i" >> commit
  25                i=$(($i+1)) ||
  26                echo $? > exit-status
  27         done &&
  28         echo "commit refs/heads/master" &&
  29         echo "author A U Thor <author@email.com> 123456789 +0000" &&
  30         echo "committer C O Mitter <committer@email.com> 123456789 +0000" &&
  31         echo "data 5" &&
  32         echo ">2gb" &&
  33         cat commit) |
  34        git fast-import --big-file-threshold=2 &&
  35        test ! -f exit-status
  36
  37'
  38
  39test_expect_success 'clone - bare' '
  40
  41        git clone --bare --no-hardlinks . clone-bare
  42
  43'
  44
  45test_expect_success 'clone - with worktree, file:// protocol' '
  46
  47        git clone file://. clone-wt
  48
  49'
  50
  51test_done