-
Notifications
You must be signed in to change notification settings - Fork 140
diff: release all handles before running external diff #213
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
Conversation
/submit |
Submitted as [email protected] |
This comment has been minimized.
This comment has been minimized.
When running an external diff from, say, a diff tool, it is safe to assume that we want to write the files in question. On Windows, that means that there cannot be any other process holding an open handle to said files, or even just a mapped region. So let's make sure that `git diff` itself is not holding any open handle to the files in question. In fact, we will just release the file pair right away, as the external diff uses the files we just wrote, so we do not need to hold the file contents in memory anymore. This fixes git-for-windows#1315 Signed-off-by: Johannes Schindelin <[email protected]>
bef83fc
to
8a02132
Compare
/submit |
Submitted as [email protected] |
This branch is now known as |
This patch series was integrated into pu via git@2de7515. |
This patch series was integrated into pu via git@3779829. |
This patch series was integrated into pu via git@6116512. |
This patch series was integrated into pu via git@28c319b. |
This patch series was integrated into next via git@7aa292c. |
This patch series was integrated into pu via git@b54ebd0. |
This patch series was integrated into pu via git@44d6127. |
This patch series was integrated into pu via git@d9beb46. |
This patch series was integrated into next via git@d9beb46. |
This patch series was integrated into master via git@d9beb46. |
Closed via d9beb46. |
On Windows, it is not possible to overwrite a file as long as any process holds a read handle to it. Even keeping regions memory-mapped prevents that.
When
git difftool
callsgit diff
, it might be the user's intention to write the file(s) via the diff tool, so let's make sure that they are not memory-mapped at that stage.Changes since v1: