-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
do checkout before changing HEAD #20916
Conversation
maybe we should try to create a test repo that hits one of those corner cases with permissions or file types changing? |
I guess, but is there a way to do it so that it works across all platforms? |
I don't think these issues were a problem on all platforms though. I'll have to test if they occur at all on Windows. |
Given the changes to LibGit2, a backport will need to be a bit different. Do you want me to put together another PR? |
let's see if/when 0.5.2 ends up being necessary before spending time on it, if non-trivial |
added a test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay, thank you!
What would the backport version of this look like? |
* do checkout before changing HEAD * add test for change to file permissions * add test for symlinks * add issue numbers to comments
I guess just changing the order of |
Very nice, thank you, that does appear to fix the issue on 0.5. Will add the |
According to the libgit2 docs, we should call
git_checkout_*
before changing the HEAD ref. This is generally not a big problem as Pkg does aforce
checkout (which is probably not a good idea either, but that's for another day), except in a few edge cases.Fixes both #17610 and #18420. Unfortunately, I have no idea how to test this.