Skip to content

I would like to request a new context menu item, such as "Open with External Mergetool". #35

@FoliniC

Description

@FoliniC

Currently, it's not straightforward to launch an external git mergetool (like Meld) from the VS Code UI when
dealing with a merge conflict.

I'm trying to use the existing "Open Changes (difftool)" context menu item on a
conflicted file. However, this invokes git difftool, which performs a 2-way comparison and is not the correct
tool for resolving a 3-way merge conflict. This leads to confusion and forces users to drop into the terminal
to manually run git mergetool.

The current workflow for using an external merge tool is inconvenient and disrupts the UI-centric experience
of VS Code.

Describe the solution you'd like

I would like to request a new context menu item, such as "Open with External Mergetool".

This new command should:

  1. Be visible in the context menu when right-clicking a file that is in a merge conflict state (e.g., under
    the "Merge Changes" group in the Source Control view).
  2. When selected, it should execute the git mergetool command for the selected file (e.g., git mergetool
    path/to/conflicted/file.txt).
  3. This would then trigger the external merge tool configured in the user's Git settings, opening the proper
    3-way merge view.

Alternatively, could the existing "Open Changes (difftool)" command be made context-aware? When a file is in
a merge conflict state, perhaps this command could intelligently invoke git mergetool instead of git
difftool. The menu item's label could even dynamically change to "Open Changes (mergetool)" to reflect the
action it will perform.

Describe alternatives you've considered

The main alternative is to manually open the integrated terminal and type git mergetool. While functional,
this is less efficient and integrated than a dedicated context menu option.

Additional context

This feature would greatly improve the workflow for developers who prefer the power and layout of a
dedicated merge tool like Meld for resolving complex conflicts, while still wanting to stay within the VS
Code interface for initiating the action. It would make the integration of external merge tools feel much
more native to VS Code.

Thank you for considering this request

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions