-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clone files on OSX-like platforms when possible, instead of copying the whole file #79243
Commits on Dec 5, 2022
-
Initial implementation of fix for dotnet#77835 - cloning files on macOS
• Use copyfile (with COPYFILE_CLONE_FORCE) when possible on macOS to clone the file while still keeping file locking logic intact • Split common Unix logic into multiple functions that the macOS implementation uses parts of at different times • Add string version of ResolveLinkTarget to save the allocation since part of the code needs it • Need to add tests to check the file is actually cloned so we know if it works or not
Configuration menu - View commit details
-
Copy full SHA for a373c59 - Browse repository at this point
Copy the full SHA a373c59View commit details -
Fix some build issues from previous commit for dotnet#77835
• I missed setting StringMarshalling on the LibraryImport • I missed partial on the CopyFile method implementations
Configuration menu - View commit details
-
Copy full SHA for f21a5ae - Browse repository at this point
Copy the full SHA f21a5aeView commit details -
Fix some build issues from previous commit for dotnet#77835 again
• Apparently 'Both partial method declarations must be unsafe or neither may be unsafe'
Configuration menu - View commit details
-
Copy full SHA for 1890115 - Browse repository at this point
Copy the full SHA 1890115View commit details -
Fix some build issues from previous commit for dotnet#77835 again (2)
• I love partial methods • Move unsafe keyword into the OSX method rather than in method declaration • Fix accessibility modifier of CopyFile in FileSystem.Unix.cs
Configuration menu - View commit details
-
Copy full SHA for e490d5e - Browse repository at this point
Copy the full SHA e490d5eView commit details -
Fix some build issues from previous commit for dotnet#77835 again (3)
• Fix indentation (should have used spaces) • Import Microsoft.Win32.SafeHandles in FileSystem.CopyFile.OSX.cs file • Fix for SA1205 'Partial elements should declare an access modifier' • Fix typo in FileSystem.CopyFile.OtherUnix.cs of 'startedCopyFile' • Fix missing openDst parameter code in StartCopyFile • Fix not checking the nullability in StandardCopyFile, which led to 'Possible null reference argument for parameter'
Configuration menu - View commit details
-
Copy full SHA for 1e43a91 - Browse repository at this point
Copy the full SHA 1e43a91View commit details -
Fix some build issues from previous commit for dotnet#77835 again (4)
• Add missing parameter value (openNewFile) to OpenCopyFileDstHandle • Fix misnamed variable usages throughout some code • Properly qualify Interop.ErrorInfo • This should be the last fix for build issues for this set
Configuration menu - View commit details
-
Copy full SHA for 4c5a995 - Browse repository at this point
Copy the full SHA 4c5a995View commit details -
Fix some build issues from previous commit for dotnet#77835 again (5)
• Add missing nullable ? for dstHandle (which obtains the file lock)
Configuration menu - View commit details
-
Copy full SHA for c65e229 - Browse repository at this point
Copy the full SHA c65e229View commit details
Commits on Dec 6, 2022
-
Fix copying a file onto itself logic for dotnet#77835
• Test failures were since copying a file onto itself should cause an error, this fixes that
Configuration menu - View commit details
-
Copy full SHA for 5377efb - Browse repository at this point
Copy the full SHA 5377efbView commit details -
Fix some nullability issues from previous commit for dotnet#77835
• Fix nullability issues
Configuration menu - View commit details
-
Copy full SHA for 8d8328a - Browse repository at this point
Copy the full SHA 8d8328aView commit details -
Fix some nullability issues from previous commit for dotnet#77835 (ag…
…ain) • The variable in the if statements weren't updated • Handling for if readlink fails
Configuration menu - View commit details
-
Copy full SHA for 835fc2f - Browse repository at this point
Copy the full SHA 835fc2fView commit details -
Fix bug introduced in 'Fix copying a file onto itself logic for dotne…
…t#77835' • The source path should have used sourceFullPath rather than destPath
Configuration menu - View commit details
-
Copy full SHA for 05f9d26 - Browse repository at this point
Copy the full SHA 05f9d26View commit details
Commits on Dec 8, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 5fe4cd2 - Browse repository at this point
Copy the full SHA 5fe4cd2View commit details
Commits on Jan 24, 2023
-
Merge branch 'main' of https://github.com/dotnet/runtime
Merge remote-tracking branch 'upstream'
Configuration menu - View commit details
-
Copy full SHA for 28ef104 - Browse repository at this point
Copy the full SHA 28ef104View commit details -
• From dotnet#33159 • As requested by feedback • I assumed this test already existed, so it's good we have it now
Configuration menu - View commit details
-
Copy full SHA for 21144e0 - Browse repository at this point
Copy the full SHA 21144e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 049627f - Browse repository at this point
Copy the full SHA 049627fView commit details -
• Use clonefile API instead • Update OpenReadOnly API to return the whole FileStatus • Revert changes to ResolveLinkTarget • Incorporate some feedback about how CopyFile should be implemented - Use st_dev and st_ino to optimise checks - Read them from an already required fstat call - Avoid calling clonefile when it would be likely to fail - Avoid expensive destination file locking scheme when clonefile won't be called - Fail fast when copying file onto itself
Configuration menu - View commit details
-
Copy full SHA for ab18c05 - Browse repository at this point
Copy the full SHA ab18c05View commit details -
Configuration menu - View commit details
-
Copy full SHA for 776f500 - Browse repository at this point
Copy the full SHA 776f500View commit details
Commits on Jan 30, 2023
-
Clone ACLs and make CopyOntoLockedFile test conditional
• When using clonefile, specify CLONE_ACL to ensure ACLs are cloned, matching previous behaviour • Make CopyOntoLockedFile test conditional to platforms that support file locking
Configuration menu - View commit details
-
Copy full SHA for dcddd8f - Browse repository at this point
Copy the full SHA dcddd8fView commit details -
• Remove retry logic after feedback that it is not necessary
Configuration menu - View commit details
-
Copy full SHA for ac27788 - Browse repository at this point
Copy the full SHA ac27788View commit details
Commits on May 14, 2023
-
Simplify error throwing, rename readStatus to isReadOnly, prepare for removal of StartedCopyFileState type. Co-authored-by: Stephen Toub <[email protected]> Squashed 19 commits, which addressed most of Stephen Toub's feedback. Thanks GH for all of those separate commits :)
Configuration menu - View commit details
-
Copy full SHA for f320a70 - Browse repository at this point
Copy the full SHA f320a70View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d4a962 - Browse repository at this point
Copy the full SHA 3d4a962View commit details -
Fix compilation issues by me thinking I was smart
• Add missing filePermissions field to return of StartCopyFile (which I removed because I didn't see it being used anywhere, but of course I didn't search for it)
Configuration menu - View commit details
-
Copy full SHA for a908a79 - Browse repository at this point
Copy the full SHA a908a79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16cedc6 - Browse repository at this point
Copy the full SHA 16cedc6View commit details
Commits on May 16, 2023
-
• Implement feedback to remove StandardCopyFile, and to remove StartCopyFile • Add new line before CLONE_ACL line
Configuration menu - View commit details
-
Copy full SHA for d15fed3 - Browse repository at this point
Copy the full SHA d15fed3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 617afbf - Browse repository at this point
Copy the full SHA 617afbfView commit details -
Configuration menu - View commit details
-
Copy full SHA for eb97585 - Browse repository at this point
Copy the full SHA eb97585View commit details -
Fix missed line in FileSystem.CopyFile.OSX.cs
• Missed line in FileSystem.CopyFile.OSX.cs referencing the now-removed StandardCopyFile
Configuration menu - View commit details
-
Copy full SHA for 70c6e8b - Browse repository at this point
Copy the full SHA 70c6e8bView commit details -
Update src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.…
…CopyFile.OSX.cs Co-authored-by: Stephen Toub <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f866a3d - Browse repository at this point
Copy the full SHA f866a3dView commit details -
Update src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.…
…CopyFile.OSX.cs Co-authored-by: Stephen Toub <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bf67649 - Browse repository at this point
Copy the full SHA bf67649View commit details -
Update src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.…
…CopyFile.OSX.cs Co-authored-by: Stephen Toub <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ff108db - Browse repository at this point
Copy the full SHA ff108dbView commit details -
Update src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.…
…CopyFile.OSX.cs Co-authored-by: Stephen Toub <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 69071eb - Browse repository at this point
Copy the full SHA 69071ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20c42f9 - Browse repository at this point
Copy the full SHA 20c42f9View commit details -
• Explain more clearly why we open a lock to the destination file before deleting it
Configuration menu - View commit details
-
Copy full SHA for 1280a8a - Browse repository at this point
Copy the full SHA 1280a8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f33ae9c - Browse repository at this point
Copy the full SHA f33ae9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 068a8aa - Browse repository at this point
Copy the full SHA 068a8aaView commit details
Commits on May 17, 2023
-
Remove some comments as per feedback
• Remove comments saying to keep code in sync as per feedback
Configuration menu - View commit details
-
Copy full SHA for 2c48aad - Browse repository at this point
Copy the full SHA 2c48aadView commit details -
• Update some comments to make things clear • Shorten comment and code that interprets the error as per feedback
Configuration menu - View commit details
-
Copy full SHA for ef84010 - Browse repository at this point
Copy the full SHA ef84010View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8924afe - Browse repository at this point
Copy the full SHA 8924afeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1649d43 - Browse repository at this point
Copy the full SHA 1649d43View commit details
Commits on May 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a82767b - Browse repository at this point
Copy the full SHA a82767bView commit details -
Implement suggestion that cuts down on duplication
• Implement suggestion from @tmds that greatly cuts down on code duplication :)
Configuration menu - View commit details
-
Copy full SHA for c0c7e33 - Browse repository at this point
Copy the full SHA c0c7e33View commit details -
Configuration menu - View commit details
-
Copy full SHA for 18b8c2e - Browse repository at this point
Copy the full SHA 18b8c2eView commit details -
Remove some other unnecessary usings
• This time in FileSystem.TryCloneFile.OSX.cs
Configuration menu - View commit details
-
Copy full SHA for 00b68ed - Browse repository at this point
Copy the full SHA 00b68edView commit details -
Configuration menu - View commit details
-
Copy full SHA for afa73ca - Browse repository at this point
Copy the full SHA afa73caView commit details -
Configuration menu - View commit details
-
Copy full SHA for a684785 - Browse repository at this point
Copy the full SHA a684785View commit details -
Configuration menu - View commit details
-
Copy full SHA for 61c0576 - Browse repository at this point
Copy the full SHA 61c0576View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c6c80b - Browse repository at this point
Copy the full SHA 7c6c80bView commit details
Commits on May 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 9cdb4b3 - Browse repository at this point
Copy the full SHA 9cdb4b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2dc08e4 - Browse repository at this point
Copy the full SHA 2dc08e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 02cfaf6 - Browse repository at this point
Copy the full SHA 02cfaf6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1fc02f7 - Browse repository at this point
Copy the full SHA 1fc02f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 71bc96e - Browse repository at this point
Copy the full SHA 71bc96eView commit details -
Configuration menu - View commit details
-
Copy full SHA for aa76f24 - Browse repository at this point
Copy the full SHA aa76f24View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3945a9f - Browse repository at this point
Copy the full SHA 3945a9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3457dcc - Browse repository at this point
Copy the full SHA 3457dccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 788216e - Browse repository at this point
Copy the full SHA 788216eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 233217a - Browse repository at this point
Copy the full SHA 233217aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20caacd - Browse repository at this point
Copy the full SHA 20caacdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d40467 - Browse repository at this point
Copy the full SHA 6d40467View commit details -
Configuration menu - View commit details
-
Copy full SHA for 705aa4f - Browse repository at this point
Copy the full SHA 705aa4fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a5de060 - Browse repository at this point
Copy the full SHA a5de060View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7221560 - Browse repository at this point
Copy the full SHA 7221560View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1db28fd - Browse repository at this point
Copy the full SHA 1db28fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for d360ae4 - Browse repository at this point
Copy the full SHA d360ae4View commit details -
Add some code to deal with EINVAL
• We can get EINVAL resulting from trying to copy ACLs, so we retry with with the flag to copy ACLs disabled (up to 1 time)
Configuration menu - View commit details
-
Copy full SHA for 323cf67 - Browse repository at this point
Copy the full SHA 323cf67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 44ef8f3 - Browse repository at this point
Copy the full SHA 44ef8f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 50195af - Browse repository at this point
Copy the full SHA 50195afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 53f52bc - Browse repository at this point
Copy the full SHA 53f52bcView commit details -
• Let me know if I should add these comments back
Configuration menu - View commit details
-
Copy full SHA for aee3ea8 - Browse repository at this point
Copy the full SHA aee3ea8View commit details
Commits on May 24, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c6174e6 - Browse repository at this point
Copy the full SHA c6174e6View commit details -
Update src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.…
…TryCloneFile.OSX.cs Co-authored-by: Dan Moseley <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0838d9f - Browse repository at this point
Copy the full SHA 0838d9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 013c775 - Browse repository at this point
Copy the full SHA 013c775View commit details -
Configuration menu - View commit details
-
Copy full SHA for 487aee9 - Browse repository at this point
Copy the full SHA 487aee9View commit details -
Extract attempting clonefile to a separate function
• As per feedback. It allows us to avoid the gotos. • Also reorder the check on the second retry.
Configuration menu - View commit details
-
Copy full SHA for 37b5183 - Browse repository at this point
Copy the full SHA 37b5183View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc99ec9 - Browse repository at this point
Copy the full SHA bc99ec9View commit details -
Use a debug statement to check EINVAL instead
• Since it should only happen for an invalid filesystem anyway
Configuration menu - View commit details
-
Copy full SHA for e1c7739 - Browse repository at this point
Copy the full SHA e1c7739View commit details -
Configuration menu - View commit details
-
Copy full SHA for aec1eac - Browse repository at this point
Copy the full SHA aec1eacView commit details -
Configuration menu - View commit details
-
Copy full SHA for 483858d - Browse repository at this point
Copy the full SHA 483858dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f67bd18 - Browse repository at this point
Copy the full SHA f67bd18View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5cf74af - Browse repository at this point
Copy the full SHA 5cf74afView commit details
Commits on Jun 6, 2023
-
Implement feedback to use partial functions
• Implement feedback to use partial functions so that TryCloneFile doesn't have to exist other than when it's actually needed
Configuration menu - View commit details
-
Copy full SHA for 10011a5 - Browse repository at this point
Copy the full SHA 10011a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for a793bb7 - Browse repository at this point
Copy the full SHA a793bb7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 550a76a - Browse repository at this point
Copy the full SHA 550a76aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 32c5463 - Browse repository at this point
Copy the full SHA 32c5463View commit details
Commits on Jun 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for de964d0 - Browse repository at this point
Copy the full SHA de964d0View commit details