Skip to content

add resolve command #1234

Open
Open

Description

@Rudxain

It works like this (updated to fix bug):

git diff --name-only --diff-filter=U --relative -z |
    xargs -0r $(git var GIT_EDITOR) && \
    git diff --check . && \
    git add . && \
    git continue

I have an approximation of it as an alias

Activity

  1. spacewander commented on Feb 25, 2026

    @spacewander
    Collaborator

    @hyperupcall
    What do you think?

  2. hyperupcall commented on Feb 27, 2026

    @hyperupcall
    Collaborator

    If I'm understanding this correctly, this handles all merge conflicts by launching each file in an editor, where the user can resolve the conflict, right? It might seem useful. Any reason why the --ignore-errors is needed?

  3. Rudxain commented on Mar 3, 2026

    @Rudxain
    ContributorAuthor

    launching each file in an editor, where the user can resolve the conflict, right?

    Yes, all "both modified" files are opened in a single editor process (in most cases; rarely multiple processes), as in this command but it should be more API stable.

    Though, it still opens files whose conflict-markers have been removed, which is annoying.

    why the --ignore-errors is needed?

    I misunderstood the add ("error" is unclear; it seems to refer to filesystem errs) docs and believed it was like diff --check (stage all files in WD except ones with conflict markers, return non-zero exit-code if any file in WD had markers)

  4. Rudxain commented on Mar 4, 2026

    @Rudxain
    ContributorAuthor

    I've opened #1236 to improve UX at the cost of doubling the size. I'm sure it can be optimized further, but IDK how

  5. hyperupcall commented on May 14, 2026

    @hyperupcall
    Collaborator

    I see, that makes sense to me, I think this would be a good addition! I think it should be called resolve-conflicts since that is more specific and informative.

  6. hyperupcall commented on May 14, 2026

    @hyperupcall
    Collaborator

    I think that it is okay if it opens files where the conflict markers have been removed. As long as it opens the same files as before. It may be possible to add some sort of flag so that files without conflict markers are skipped.

    If @spacewander OK's this as well, then I think you're good to move forward with the draft PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions