Windows: improve checkout performance with large numbers of files#704
Closed
dscho wants to merge 1 commit into
Closed
Windows: improve checkout performance with large numbers of files#704dscho wants to merge 1 commit into
dscho wants to merge 1 commit into
Conversation
Update mingw_unlink() to first try to delete the file with existing permissions before trying to force it. Windows throws an error when trying to delete a read-only file. The mingw_unlink() compatibility wrapper always tries to _wchmod(666) the file before calling _wunlink() to avoid that error. However, since most files in the worktree are already writable, this is usually wasted effort. Update mingw_unlink() to just call DeleteFileW() directly and if that succeeds return. If that fails, fall back into the existing code path to update the permissions and use _wunlink() to get the existing error code mapping. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Member
Author
|
/preview |
|
Preview email sent as pull.704.git.1597659175677.gitgitgadget@gmail.com |
Member
Author
|
/submit |
|
Submitted as pull.704.git.1597660622615.gitgitgadget@gmail.com |
|
This branch is now known as |
|
This patch series was integrated into seen via git@99fc326. |
|
This patch series was integrated into seen via git@d85575f. |
|
This patch series was integrated into next via git@fb53a3d. |
|
This patch series was integrated into seen via git@5a04826. |
|
This patch series was integrated into next via git@5a04826. |
|
This patch series was integrated into master via git@5a04826. |
|
Closed via 5a04826. |
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.
Jeff Hostetler contributed this patch to Git for Windows a while ago after measuring ~15% improvement with a very, very large worktree: