From eab5db982cb75f748a7d7bcccf8eae7f1d15bc5d Mon Sep 17 00:00:00 2001 From: Jai <814683@qq.com> Date: Mon, 9 Aug 2021 21:36:42 +0800 Subject: [PATCH] feature: support for finding Tortoise Merge from TortoiseGit --- src/Models/MergeTool.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Models/MergeTool.cs b/src/Models/MergeTool.cs index 21d550d8..1f991023 100644 --- a/src/Models/MergeTool.cs +++ b/src/Models/MergeTool.cs @@ -20,7 +20,7 @@ namespace SourceGit.Models { new MergeTool(0, "--", "", "", "", () => ""), new MergeTool(1, "Visual Studio Code", "Code.exe", "-n --wait \"$MERGED\"", "-n --wait --diff \"$LOCAL\" \"$REMOTE\"", FindVSCode), new MergeTool(2, "Visual Studio 2017/2019", "vsDiffMerge.exe", "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\" /m", "\"$LOCAL\" \"$REMOTE\"", FindVSMerge), - new MergeTool(3, "Tortoise Merge", "TortoiseMerge.exe", "-base:\"$BASE\" -theirs:\"$REMOTE\" -mine:\"$LOCAL\" -merged:\"$MERGED\"", "-base:\"$LOCAL\" -theirs:\"$REMOTE\"", FindTortoiseMerge), + new MergeTool(3, "Tortoise Merge", "TortoiseMerge.exe;TortoiseGitMerge.exe", "-base:\"$BASE\" -theirs:\"$REMOTE\" -mine:\"$LOCAL\" -merged:\"$MERGED\"", "-base:\"$LOCAL\" -theirs:\"$REMOTE\"", FindTortoiseMerge), new MergeTool(4, "KDiff3", "kdiff3.exe", "\"$REMOTE\" -b \"$BASE\" \"$LOCAL\" -o \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\"", FindKDiff3), new MergeTool(5, "Beyond Compare 4", "BComp.exe", "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\"", FindBCompare), new MergeTool(6, "WinMerge", "WinMergeU.exe", "-u -e \"$REMOTE\" \"$LOCAL\" \"$MERGED\"", "-u -e \"$LOCAL\" \"$REMOTE\"", FindWinMerge), @@ -90,10 +90,10 @@ namespace SourceGit.Models { var root = RegistryKey.OpenBaseKey( RegistryHive.LocalMachine, Environment.Is64BitOperatingSystem ? RegistryView.Registry64 : RegistryView.Registry32); - - var tortoiseSVN = root.OpenSubKey("SOFTWARE\\TortoiseSVN"); - if (tortoiseSVN == null) return ""; - return tortoiseSVN.GetValue("TMergePath") as string; + + var tortoise = root.OpenSubKey("SOFTWARE\\TortoiseGit") ?? root.OpenSubKey("SOFTWARE\\TortoiseSVN"); + if (tortoise == null) return ""; + return tortoise.GetValue("TMergePath") as string; } private static string FindKDiff3() {