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

Re: [RFC] git worktree: use filesystem cloning where supported

From
Peter Morris <mrpmorris@gmail.com>
Date
Aug 15, 2026, 18:09 UTC
Message-ID
<CAOqWQbL24ZsLfDnc8pzCAdwaumWuoNaJOGz01PNSPxSkw6ZCqw@mail.gmail.com>
In-Reply-To
<aoB4pOTtJ65PjwPA@fruit.crustytoothpaste.net>
Show 6 quoted lines
> ReFS has serious defects in its implementation.  If the data has been
> written but not flushed to disk, the resulting copy will be corrupt.  I
> just saw this come in with Git LFS[0] and I described it to a colleague
> as "horribly broken".  I definitely don't recommend adding support for
> this to Git until only fixed versions of Windows are publicly available.
> [snip]

Windows CopyFile API opens the source file shared-read deny-write, so you cannot write to the file whilst it is being copied or you cannot copy the file because someone already has a write handle open.

So this wouldn't happen on Windows.

On Linux and Mac it seems they don't do the same. Linux FICLONE is supposed to be atomic so no problems if that is used, and for MacOS I can't see anything that would enable this to work.

So it would be Windows and Linux only.
Previous: brian m. carlson
Message 8 of 8 in “[RFC] git worktree: use filesystem cloning where supported”
  1. Peter MorrisAug 14, 2026
  2. Kristoffer HaugsbakkAug 14, 2026
  3. Junio C HamanoAug 14, 2026
  4. Peter MorrisAug 15, 2026
  5. Kristoffer HaugsbakkAug 14, 2026
  6. Peter MorrisAug 14, 2026
  7. brian m. carlsonAug 15, 2026
  8. Peter MorrisAug 15, 2026

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.