Replace the dependency on GNU patch by a strict dependency on git#5400
Merged
kit-ty-kate merged 5 commits intoocaml:masterfrom Mar 4, 2024
Merged
Replace the dependency on GNU patch by a strict dependency on git#5400kit-ty-kate merged 5 commits intoocaml:masterfrom
kit-ty-kate merged 5 commits intoocaml:masterfrom
Conversation
e69d1b5 to
371922b
Compare
Member
|
I have a recollection that this wasn't a silver bullet on the Windows side but I think that may have been before the patch rewriter was added. Regardless, this is well-worth revising, thanks! Even if we end up having to keep the patch pre-processing, at least there's only one patch program then to be considering... |
Closed
Contributor
|
This is great, I've had problems with GNU patch on Windows from Cygwin, which lead me to replace this code cd ~/opam-repository \
&& (git cat-file -e $OPAM_HASH || git fetch origin master) \
&& git reset -q --hard $OPAM_HASH \
&& git --no-pager log --no-decorate -n1 --oneline \
&& opam update -uwith cd /home/opam/opam-repository \
&& (git cat-file -e $OPAM_HASH || git fetch origin opam2) \
&& git reset -q --hard $OPAM_HASH \
&& git --no-pager log --no-decorate -n1 --oneline \
&& rsync -ar --update --exclude='.git' ./ /cygdrive/c/opam/.opam/repo/default \
&& ocaml-env exec --64 -- opam update -u |
65e8e7b to
93c43ac
Compare
93c43ac to
96fb31e
Compare
Member
Author
|
done |
dra27
approved these changes
Mar 4, 2024
Member
dra27
left a comment
There was a problem hiding this comment.
LGTM - if whatever it was in the past that caused me to revert this idea re-emerges, we'll be able to address it during the rest of the release cycle.
rjbou
reviewed
Mar 4, 2024
Collaborator
kit-ty-kate
added a commit
that referenced
this pull request
Mar 20, 2024
Revert "Merge pull request #5400 from kit-ty-kate/no-gpatch"
This file contains hidden or 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
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.
Fixes #3433
Fixes #3782
Fixes #3639 for good
Helps #3482
While looking at #3639 happening for many macOS users, I realized that
git applybasically ships with its own version of GNU patch which works correctly.The original issue is that macOS is a POSIX-complient OS. However POSIX-complient patch seems to be a nightmare: you can't tell it to delete files. It'll just make it empty instead. There are non-posix options (
-E) that deletes empty files anyway but those have another problem where it can't distinguish between you deleting the file and emptying the file... This issue also appears on BSDs.The solution here is to make git a required dependency. Most users will have it anyway and many features are missing without it so it's not too much of a stretch to make it mandatory.