diff options
author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | 2010-05-20 22:57:53 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-05-21 03:12:13 +0400 |
commit | c8b296450e5148c576697ea4709072b7855aacd5 (patch) | |
tree | 447e36e197bcccdc6fd2f16b59b4742fcfaf2d8d /t/t5705-clone-2gb.sh | |
parent | fc012c2810c237dd2299a3fc85b18c2beb60b730 (diff) |
Fix checkout of large files to network shares on Windows XP
Bigger writes to network drives on Windows XP fail. Cap them at 31MB to
allow them to succeed. Callers need to be prepared for write() calls
that do less work than requested anyway.
On local drives, write() calls are translated to WriteFile() calls with
a cap of 64KB on Windows XP and 256KB on Vista. Thus a cap of 31MB won't
affect the number of WriteFile() calls which do the actual work. There's
still room for some other version of Windows to use a chunk size of 1MB
without increasing the number of system calls.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5705-clone-2gb.sh')
-rwxr-xr-x | t/t5705-clone-2gb.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/t/t5705-clone-2gb.sh b/t/t5705-clone-2gb.sh index adfaae8c5b..8afbdd4de2 100755 --- a/t/t5705-clone-2gb.sh +++ b/t/t5705-clone-2gb.sh @@ -12,7 +12,7 @@ test_expect_success 'setup' ' git config pack.compression 0 && git config pack.depth 0 && - blobsize=$((20*1024*1024)) && + blobsize=$((100*1024*1024)) && blobcount=$((2*1024*1024*1024/$blobsize+1)) && i=1 && (while test $i -le $blobcount @@ -36,9 +36,15 @@ test_expect_success 'setup' ' ' -test_expect_success 'clone' ' +test_expect_success 'clone - bare' ' - git clone --bare --no-hardlinks . clone + git clone --bare --no-hardlinks . clone-bare + +' + +test_expect_success 'clone - with worktree, file:// protocol' ' + + git clone file://. clone-wt ' |