mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
refactor: external diff merge tool - supports to use difftool/mergetool settings from git config directly (#181)
This commit is contained in:
parent
06245320a9
commit
c56d0cf85e
15 changed files with 89 additions and 163 deletions
|
@ -98,18 +98,9 @@ namespace SourceGit.ViewModels
|
|||
|
||||
public void OpenExternalMergeTool()
|
||||
{
|
||||
var type = Preference.Instance.ExternalMergeToolType;
|
||||
var exec = Preference.Instance.ExternalMergeToolPath;
|
||||
|
||||
var tool = Models.ExternalMerger.Supported.Find(x => x.Type == type);
|
||||
if (tool == null || !File.Exists(exec))
|
||||
{
|
||||
App.RaiseException(_repo, "Invalid merge tool in preference setting!");
|
||||
return;
|
||||
}
|
||||
|
||||
var args = tool.Type != 0 ? tool.DiffCmd : Preference.Instance.ExternalMergeToolDiffCmd;
|
||||
Task.Run(() => Commands.MergeTool.OpenForDiff(_repo, exec, args, _option));
|
||||
var toolType = Preference.Instance.ExternalMergeToolType;
|
||||
var toolPath = Preference.Instance.ExternalMergeToolPath;
|
||||
Task.Run(() => Commands.MergeTool.OpenForDiff(_repo, toolType, toolPath, _option));
|
||||
}
|
||||
|
||||
private void LoadDiffContent()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue