Skip to main content

run_mergetool

Function run_mergetool 

Source
pub fn run_mergetool(
    repo: &impl GitRepo,
    conflicting_files: &[String],
) -> Result<bool>
Expand description

Launch the configured merge tool for every file in conflicting_files.

Suspends the TUI before the first tool invocation and restores it after the last one, so each tool instance has full control of the terminal. The TUI is always restored, even when a tool exits with a non-zero status.

Returns true when the tool was invoked for at least one file, or false when no merge tool is configured (so the caller can show a hint).