-
-
Notifications
You must be signed in to change notification settings - Fork 260
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
Use Sys.isexecutable() to calculate git hashes #2253
Merged
Merged
Conversation
This file contains 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
Since our libuv now understands file permissions better on windows, we can finally use `Sys.isexecutable()` on Windows. :)
One of the tests stopped being broken so I pushed a commit that tweaked that. However, another test seems to have started to break:
|
This prevents different umasks and platform permissions defaults from interfering with our git tree hashing tests.
This is actually a good thing! The test was assuming an initial permissions that wasn't true on Windows, but because we were permissions blind before, the test still passed. I've changed it to now explicitly set the permissions of the file, so we should be good to go on that test. |
KristofferC
pushed a commit
that referenced
this pull request
Dec 3, 2020
* Use Sys.isexecutable() to calculate git hashes Since our libuv now understands file permissions better on windows, we can finally use `Sys.isexecutable()` on Windows. :) * change a test to no longer be broken * Explicitly set permissions of file before treehashing This prevents different umasks and platform permissions defaults from interfering with our git tree hashing tests. Co-authored-by: KristofferC <[email protected]> (cherry picked from commit 0f5c26e)
StefanKarpinski
added a commit
to JuliaIO/Tar.jl
that referenced
this pull request
Dec 4, 2020
Unbekownst to me, Windows defaults to files being executable, so we were incorrectly extracting normal files as executables. We didn't detect this because until JuliaLang/julia#35625 we were blind to the executable bit on Windows. With that change, however, we can now tell that we are incorrectly leaving normal files executable. JuliaLang/Pkg.jl#2253 fixes Pkg's GitTools.tree_hash and in the process breaks our tests since they now correctly detect that we are extracting non-executable files incorrectly on Windows. This PR fixes that, making tests pass again with that fix.
StefanKarpinski
added a commit
to JuliaIO/Tar.jl
that referenced
this pull request
Dec 4, 2020
Unbekownst to me, Windows defaults to files being executable, so we were incorrectly extracting normal files as executables. We didn't detect this because until JuliaLang/julia#35625 we were blind to the executable bit on Windows. With that change, however, we can now tell that we are incorrectly leaving normal files executable. JuliaLang/Pkg.jl#2253 fixes Pkg's GitTools.tree_hash and in the process breaks our tests since they now correctly detect that we are extracting non-executable files incorrectly on Windows. This PR fixes that, making tests pass again with that fix.
StefanKarpinski
added a commit
to JuliaIO/Tar.jl
that referenced
this pull request
Dec 4, 2020
Unbekownst to me, Windows defaults to files being executable, so we were incorrectly extracting normal files as executables. We didn't detect this because until JuliaLang/julia#35625 we were blind to the executable bit on Windows. With that change, however, we can now tell that we are incorrectly leaving normal files executable. JuliaLang/Pkg.jl#2253 fixes Pkg's GitTools.tree_hash and in the process breaks our tests since they now correctly detect that we are extracting non-executable files incorrectly on Windows. This PR fixes that, making tests pass again with that fix. * Use `Sys.isexecutable()` on Windows to determine file mode * Manually set permissions while copying symlinks * copy mode recursively for copied symlinks on Windows * use a copy of `Pkg.GitTools.tree_hash` with `isexecutable` fix Co-authored-by: Elliot Saba <[email protected]>
KristofferC
added a commit
that referenced
this pull request
Dec 5, 2020
This reverts commit 0f5c26e.
staticfloat
added a commit
that referenced
this pull request
Jan 6, 2021
* Use Sys.isexecutable() to calculate git hashes Since our libuv now understands file permissions better on windows, we can finally use `Sys.isexecutable()` on Windows. :) * change a test to no longer be broken * Explicitly set permissions of file before treehashing This prevents different umasks and platform permissions defaults from interfering with our git tree hashing tests. Co-authored-by: KristofferC <[email protected]> (cherry picked from commit 0f5c26e)
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.
Since our libuv now understands file permissions better on windows, we can finally use
Sys.isexecutable()
on Windows. :)