-
Notifications
You must be signed in to change notification settings - Fork 368
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
opam update
fails because of custom git settings diff.noprefix
#3627
Comments
Try fixing ocaml#3627 as suggested there. To test.
Fix ocaml#3627 by ensuring git produces a `-p1` diff. This is a very limited fix but appears to work in my usecase. I have reviewed the other uses of `git diff` in the same file, but it appears their output is not passed to `patch` hence this change is unnecessary.
Thanks for the detailed report. Sometimes, we have to overwrite some user git configuration to have git behaves like opam needs to. We can add in the opam internal git repo local config option to disable
There is no perfect solution about config, both have their wrong side-effect: keeping config interferes with opam/git expectation, but discarding it can also leads to some misbehaviour e.g. if git is configured to use a proxy. |
Fix ocaml#3627 by ensuring git produces a `-p1` diff. This is a very limited fix but appears to work in my usecase. I have reviewed the other uses of `git diff` in the same file, but it appears their output is not passed to `patch` hence this change is unnecessary.
Fix #3627 by ensuring git produces a `-p1` diff. This is a very limited fix but appears to work in my usecase. I have reviewed the other uses of `git diff` in the same file, but it appears their output is not passed to `patch` hence this change is unnecessary.
Fix ocaml#3627 by ensuring git produces a `-p1` diff. This is a very limited fix but appears to work in my usecase. I have reviewed the other uses of `git diff` in the same file, but it appears their output is not passed to `patch` hence this change is unnecessary.
Fix ocaml#3627 by ensuring git produces a `-p1` diff. This is a very limited fix but appears to work in my usecase. I have reviewed the other uses of `git diff` in the same file, but it appears their output is not passed to `patch` hence this change is unnecessary.
Fix ocaml#3627 by ensuring git produces a `-p1` diff. This is a very limited fix but appears to work in my usecase. I have reviewed the other uses of `git diff` in the same file, but it appears their output is not passed to `patch` hence this change is unnecessary.
opam update
fails on the iris-dev repo if my~/.gitconfig
contains:That changes the output of
git diff
to default to-p0
not-p1
— butopam
generates a diff withgit "diff" "--no-ext-diff" "-R" "-p" "refs/remotes/opam-ref" "--"
and tries to apply that withpatch -p1
duringopam update
.The minimal possible fix seems to reset this option via
git -c diff.noprefix=false "diff"
(I might try this), but always skipping the local git config files could be more robust.man git
has this suggestion:Command outputs
Install works:
Update doesn't:
After undoing the migration via
cd ~/.opam/repo/iris-dev; git reset HEAD; git checkout .; git clean -fdx
, the update works again, once.The failure appears to be when running
patch -p1
against a-p0
patch generated by/usr/local/bin/git "diff" "--no-ext-diff" "-R" "-p" "refs/remotes/opam-ref" "--"
.Full output of
opam update -vv
(warning: 6M) here:https://gist.github.com/Blaisorblade/24189e423677a61e524273d705091c6c. The issue is that
git diff
is indeed supposed to generate-p1
patches.The text was updated successfully, but these errors were encountered: