-
-
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
Fix #294 - Make "git apply" working in non-root-git dirs #296
Conversation
Hi @cweagans, can we merge this? |
I appreciate the work and research that you've put into this, but I'm probably not going to merge this. If it's not a git directory in the first place, there's not a good reason to use Git to apply patches to that directory. |
@mvorisek can't help in this since I don't get the use case. |
@samdark Any system, where |
Ah, so it is backwards compatible platform compatibility fix? |
It is forward and backward compatible. I spent quite a lot of time to address this issue properly. In past the With this PR, the |
I see. Well, it makes sense as a fallback but it's @cweagans to decide. |
Why not just install ‘patch’? https://chocolatey.org/packages/patch There’s only so far we can go to work around missing host dependencies, and this seems like overstepping that for a very rare thing. In 2.x, patch application will be a capability, so you can extend it in a separate plugin. I’m still not convinced that this needs to happen at all though. |
this tools should work in any enviroment where composer does, right? Currently, any users that: This affected group is large, it was already reported here many times and we can fix this issue very robustly with a few lines of code without any side effect. In code, the current behaviour is described as:
very likely because of this issue. I hope I explained the current situation well. Now, back to your question - if I distribute my app patched using this package, is convincing users to install any executable really a better solution than a few lines of fixes in plugin that can work of the box? @cweagans, please, review this PR. It would really help me and I hope others as well. Thank you. |
Yes, as long as the system dependencies are satisfied. You didn't answer my question though. Why can't/won't you install
We don't have any way of verifying this assertion in 1.x. I've made this assumption before and ended up causing myself a lot of work to get the plugin working again quickly because I broke a workflow for somebody. I'm not thrilled about the idea of making this assumption for something that can be easily worked around by installing a common tool on your workstation.
I don't think it's unreasonable to expect that a developer has (or can have) both Again, what you want to do will be possible by extending this plugin in 2.x, but I just haven't had time to get it done. |
@cweagans you have to know that you need to install it. As far as I understand the issue, it currently fails silently without giving any clue. |
Okay. That is something that I could see fixing in 1.x. |
@cweagans Can you please merge then? I hit this issue again and the patch is highly welcomed also for linux - Alpine has no |
@mvorisek in alpinelinux you need anyway to run |
@mvorisek My apologies. I may not have communicated clearly enough. I'm willing to merge a PR that gives an explicit error message about |
Moreover it's just 100KB vs 20MB of git |
@cweagans thanks for info - this PR solves however the
I am not sure if I explained the issues well, but this PR:
Please reconsider this fix once again. |
@mvorisek I did take the time to thoroughly understand the PR. The problem is not a lack of understanding. It's that I disagree with the premise. In 2.x (if I can ever get it finished and out the door), you'll be able to write a separate plugin that extends this one. Via Composer Capabilities, you'll be able to define whatever method you like for applying patches (including creating a fake .git dir and using git apply if that's what you want to do for whatever reason). In either case though, I'm really not willing to bring this into the core plugin. The solution is to simply install |
Fixes #294