Skip to content

git node backport v8 does not work on macOS #421

Description

@dominykas

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.

Activity

  1. codebytere commented on May 20, 2020

    @codebytere
    Member

    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!

  2. dominykas commented on May 25, 2020

    @dominykas
    MemberAuthor

    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 👍

  3. targos commented on May 25, 2020

    @targos
    Member

    @dominykas what did git apply -3 leave?

  4. dominykas commented on May 25, 2020

    @dominykas
    MemberAuthor

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

  5. targos commented on May 25, 2020

    @targos
    Member

    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

  6. self-assigned this
    on May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions