Repository navigation
Conversation
…source of cloning properly
…t expected to be cloned even it those files are clean, that is more conservative approach.
…ailed clone attempt on NTFS
…ot needed because proper file size was set on file creation.
…kipped if worktree is created in empty folder
…segment is not cloned because cloning not aligned segment is slow, it is rather copied from source. Fixed and optimized check for source-clone for git repositories with autocrlf=false where cloning was not executed at all (facebook/react, microsoft/vscode, kubernetes/kubernetes).
qub1n
marked this pull request as draft
October 5, 2026 19:01
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there,
I spent some time with testing, fixing and optimizing ReFS support for git work tree implementation originally created with copilot and now I came to the point in which it works quite good.
Correctness was tested on artificial and real git repositories.
Overall the cloning is slower for small files, so I chosen threshold of files > 160KiB for which cloning happen on ReFS.
The last unaligned segment is not cloned, but rather copied due to performance.
I was comparing runs on two VHDX disk one with ReFS and second with NTFS on my laptop Acer Nitro V16. It is faster in almost all testing cases compare to original implementation with either NTFS or ReFS and in the same time it brings space savings around 30%, space saving was counted from occupied blocks on disk.
In common repositories threshold of 160Kb clone very small amount of files (in count), but good portion of size of repository. Lower threshold would mean slightly slower creating of work tree, but much bigger space saving.