Skip to content
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

git node backport v8 does not work on macOS #421

Closed
dominykas opened this issue May 20, 2020 · 5 comments · Fixed by #432
Closed

git node backport v8 does not work on macOS #421

dominykas opened this issue May 20, 2020 · 5 comments · Fixed by #432
Assignees

Comments

@dominykas
Copy link
Member

dominykas commented May 20, 2020

I got an error saying Resolve merge conflicts and enter 'RESOLVED' - however there were no conflicts. The actual underlying failure was patch: unrecognized option '--merge' - it seems the patch on macOS does not have that option.

I'm happy to research/PR whatever would be considered an acceptable fix?

Also not sure if there's a good way to detect conflicts vs other kinds of errors - the error message was rather misleading.

@codebytere
Copy link
Member

codebytere commented May 20, 2020

The line originates here and unfortunately it looks like you're right - the patch commands are similar on macOS and on Linux but there are some nontrivial option differences, one of which is the --merge command.

I think our best bet here is probably to move away from the patch command and use git apply to accomplish the same goal. The consequent difference unfortunately though is that git apply won't apply a given patch if you have other uncommitted changes in your code, & it also won't apply a patch that does not apply cleanly. The above linked code would therefore require some light restructuring to take those externalities into account.

cc @targos for other thoughts!

@dominykas
Copy link
Member Author

I don't know what patch --merge leaves on the filesystem when there's a conflict, but git apply -3 (to do a three-way merge) worked for me 👍

@targos
Copy link
Member

targos commented May 25, 2020

@dominykas what did git apply -3 leave?

@dominykas
Copy link
Member Author

@targos the <<<<<<< ours delimited stuff - not sure what it's called.

@targos
Copy link
Member

targos commented May 25, 2020

I vaguely remember that git apply didn't always leave conflict markers, but maybe I'm wrong. And it's probably better to have something that work sometimes on all platforms than never on macOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants