author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Thu, 20 May 2010 18:57:53 +0000 (20:57 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 20 May 2010 23:12:13 +0000 (16:12 -0700) | ||
commit | c8b296450e5148c576697ea4709072b7855aacd5 | |
tree | 447e36e197bcccdc6fd2f16b59b4742fcfaf2d8d | tree | snapshot |
parent | fc012c2810c237dd2299a3fc85b18c2beb60b730 | commit | 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>
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>
compat/mingw.c | diff | blob | history | |
compat/mingw.h | diff | blob | history | |
t/t5705-clone-2gb.sh | diff | blob | history |