From 28491c6f5ecbc187e6a29b1ea77054b780af9e66 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 19 Dec 2020 13:54:55 +0100 Subject: [PATCH] Drop unused DiffBlamesWithTortoiseMerge flag Signed-off-by: Sven Strickroth --- .../TortoiseGit/tgit_dug/dug_settings_advanced.xml | 14 ------------ src/TortoiseProc/AppUtils.cpp | 26 +++++++++------------- src/TortoiseProc/AppUtils.h | 4 +--- src/TortoiseProc/Settings/SettingsAdvanced.cpp | 4 ---- 4 files changed, 11 insertions(+), 37 deletions(-) diff --git a/doc/source/en/TortoiseGit/tgit_dug/dug_settings_advanced.xml b/doc/source/en/TortoiseGit/tgit_dug/dug_settings_advanced.xml index 633c5ef16..87d7b80af 100644 --- a/doc/source/en/TortoiseGit/tgit_dug/dug_settings_advanced.xml +++ b/doc/source/en/TortoiseGit/tgit_dug/dug_settings_advanced.xml @@ -135,20 +135,6 @@ - DownloadAnimation diff --git a/src/TortoiseProc/AppUtils.cpp b/src/TortoiseProc/AppUtils.cpp index ab17a347e..62005a8e8 100644 --- a/src/TortoiseProc/AppUtils.cpp +++ b/src/TortoiseProc/AppUtils.cpp @@ -514,23 +514,19 @@ bool CAppUtils::StartExtDiff( { CString viewer; - CRegDWORD blamediff(L"Software\\TortoiseGit\\DiffBlamesWithTortoiseMerge", FALSE); - if (!flags.bBlame || !static_cast(blamediff)) + viewer = PickDiffTool(file1, file2); + // If registry entry for a diff program is commented out, use TortoiseGitMerge. + bool bCommentedOut = CStringUtils::StartsWith(viewer, L"#"); + if (flags.bAlternativeTool) { - viewer = PickDiffTool(file1, file2); - // If registry entry for a diff program is commented out, use TortoiseGitMerge. - bool bCommentedOut = CStringUtils::StartsWith(viewer, L"#"); - if (flags.bAlternativeTool) - { - // Invert external vs. internal diff tool selection. - if (bCommentedOut) - viewer.Delete(0); // uncomment - else - viewer.Empty(); - } - else if (bCommentedOut) + // Invert external vs. internal diff tool selection. + if (bCommentedOut) + viewer.Delete(0); // uncomment + else viewer.Empty(); } + else if (bCommentedOut) + viewer.Empty(); bool bInternal = viewer.IsEmpty(); if (bInternal) @@ -545,8 +541,6 @@ bool CAppUtils::StartExtDiff( viewer += g_sGroupingUUID; viewer += L'"'; } - if (flags.bBlame) - viewer += L" /blame"; } // check if the params are set. If not, just add the files to the command line if ((viewer.Find(L"%base") < 0) && (viewer.Find(L"%mine") < 0)) diff --git a/src/TortoiseProc/AppUtils.h b/src/TortoiseProc/AppUtils.h index 8bb3920cb..42f205d57 100644 --- a/src/TortoiseProc/AppUtils.h +++ b/src/TortoiseProc/AppUtils.h @@ -40,13 +40,11 @@ public: struct DiffFlags { bool bWait; - bool bBlame; bool bReadOnly; bool bAlternativeTool; // If true, invert selection of TortoiseGitMerge vs. external diff tool - DiffFlags(): bWait(false), bBlame(false), bReadOnly(false), bAlternativeTool(false) {} + DiffFlags(): bWait(false), bReadOnly(false), bAlternativeTool(false) {} DiffFlags& Wait(bool b = true) { bWait = b; return *this; } - DiffFlags& Blame(bool b = true) { bBlame = b; return *this; } DiffFlags& ReadOnly(bool b = true) { bReadOnly = b; return *this; } DiffFlags& AlternativeTool(bool b = true) { bAlternativeTool = b; return *this; } }; diff --git a/src/TortoiseProc/Settings/SettingsAdvanced.cpp b/src/TortoiseProc/Settings/SettingsAdvanced.cpp index 62ddb52f9..81bce2c36 100644 --- a/src/TortoiseProc/Settings/SettingsAdvanced.cpp +++ b/src/TortoiseProc/Settings/SettingsAdvanced.cpp @@ -70,10 +70,6 @@ CSettingsAdvanced::CSettingsAdvanced() settings[i].type = CSettingsAdvanced::SettingTypeBoolean; settings[i++].def.b = false; - settings[i].sName = L"DiffBlamesWithTortoiseMerge"; - settings[i].type = CSettingsAdvanced::SettingTypeBoolean; - settings[i++].def.b = false; - settings[i].sName = L"DiffSimilarityIndexThreshold"; settings[i].type = CSettingsAdvanced::SettingTypeNumber; settings[i++].def.l = 50; -- 2.11.4.GIT