git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix checkout of large files to network shares under Windows XP

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Apr 30, 2010, 08:46 UTC
Message-ID
<4BDA98FC.1080007@viscovery.net>
In-Reply-To
<4BD9E58E.8020406@lsrfire.ath.cx>
Am 4/29/2010 22:01, schrieb René Scharfe:
Show 17 quoted lines
> +#undef write
> +ssize_t mingw_write(int fd, const void *buf, size_t count)
> +{
> +	/*
> +	 * While write() calls to a file on a local disk are translated
> +	 * into WriteFile() calls with a maximum size of 64KB on Windows
> +	 * XP and 256KB on Vista, no such cap is placed on writes to
> +	 * files over the network on Windows XP.  Unfortunately, there
> +	 * seems to be a limit of 32MB-28KB on X64 and 64MB-32KB on x86;
> +	 * bigger writes fail on Windows XP.
> +	 * So we cap to a nice 31MB here to avoid write failures over
> +	 * the net without changing the number of WriteFile() calls in
> +	 * the local case.
> +	 */
> +	return write(fd, buf, min(count, 31 * 1024 * 1024));
> +}
> +

Thanks, I have verified that this fixes the problem in my setup as well. I'll queue the patch with the below test case squashed in.

-- Hannes
diff --git a/t/t5705-clone-2gb.sh b/t/t5705-clone-2gb.sh
index adfaae8..8afbdd4 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

 '
Previous: René ScharfeNext: Sebastian Schuberth
Message 12 of 15 in “Fix checkout of large files to network shares under Windows XP”
  1. Fix checkout of large files to network shares under Windows XPSebastian Schuberth, Apr 19, 2010
  2. Junio C HamanoApr 19, 2010
  3. Johannes SchindelinApr 20, 2010
  4. René ScharfeApr 19, 2010
  5. Albert DvornikApr 19, 2010
  6. Johannes SixtApr 20, 2010
  7. Sebastian SchuberthApr 20, 2010
  8. Johannes SixtApr 20, 2010
  9. Sebastian SchuberthApr 20, 2010
  10. René ScharfeApr 20, 2010
  11. René ScharfeApr 29, 2010
  12. Johannes SixtApr 30, 2010
  13. Sebastian SchuberthApr 30, 2010
  14. René ScharfeOct 16, 2010
  15. Dmitry PotapovOct 17, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.