-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Fixes #148: Incompatible with Git 2.14+. #165
Conversation
Ironically, while this does solve the errors thrown by Git 2.14, it actually triggers another bug, and patches don't get applied correctly. Back when This worked great. But for some reason, now that it's using |
Debugging with this command: I see this:
Git is silently skipping those file renames. No idea why. I've tried that command with different patch levels (p0, p1...) as well, none of them work. Could it be because |
This is the root cause: https://stackoverflow.com/a/27283285 tl;dr: you can't run git apply within a git repo that's not the project being patched @cweagans how do you want to address this? It seems like we need to stop using |
I think I think we should probably solve one thing at a time. If this change resolves things for the new version of Git (ideally without breaking earlier versions), we should move forward here, and then address the other issue (patches sporadically not getting applied) separately. |
Okay, I added a conditional that attempts to catch instances where I think this is the best way to preserve the current business logic while fixing the incompatibilities with newer versions of Git. Long-term, I think we should stop using |
Btw why Otoh patch is most universal way so git apply should be fallback |
This should be good to merge. I'm not really sure how to increase coverage in this instance to get that test to pass. |
There is also the |
@andypost The plugin should use the vcs-appropriate way first (right now, only git is supported, but there's no reason we can't support svn and similar), then |
@cweagans I think this is good to merge, is there anything else I can do to improve it? |
This looks good. If you make a PR against 1.x, I'll merge that and tag a 1.x release as well. |
Patches still fail under the following conditions: "cweagans/composer-patches": "^1.6.4", Error messages: |
@RalfEisler let's not have a discussion in two places, if you can provide a minimum example to reproduce please open a new issue. But as I commented in #148, I suspect there's something with that particular patch, not with Composer. |
No description provided.