Revert "Merge pull request #5400 from kit-ty-kate/no-gpatch" #5891
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.
Reverts #5400
After a couple of weeks of tests,
git apply
turned out to be bad choice for 2 main reason:--unsafe-paths
option is not just usedWhen git apply is used as a "better GNU patch"
(as the git documentation puts it), but is actually highly unsafe (who could have guessed!) and allows the application of patches outside of the selected path using../
. However opam requires one part of the behaviour of this option to work: accepting to apply changes inside of a.git
directory. This is required foropam update
to function properly.I've also observed some non-deterministic failures but it's harder to understand the reason why.
We have a couple of alternative solutions in mind, but given the critical aspect of those two issues we chose to revert it separately first to give us some more time to implement and choose a better solution.