From 610d997d4f81c5569b233bd7288200225b7c531e Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Fri, 21 Jul 2017 17:21:38 +0200 Subject: [PATCH] /startrev: and /endrev: parameters of /command:diff were mixed up Signed-off-by: Sven Strickroth --- src/Changelog.txt | 1 + src/TortoiseProc/Commands/DiffCommand.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index 3c9f3cd8e..4f5be9784 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -66,6 +66,7 @@ Released: unreleased * Fixed issue #2258: Autocomplete for Remote URL box in Sync screen doesn't work * Fixed issue #2976: After setting the config `include.path` key, can't delete the branch which is tracking the remote branch * Fixed issue #3028: Error when using TortoiseGit cli diff command with new added file in commit + * /startrev: and /endrev: parameters of /command:diff are no longer mixed up = Release 2.4.0 = Released: 2017-01-31 diff --git a/src/TortoiseProc/Commands/DiffCommand.cpp b/src/TortoiseProc/Commands/DiffCommand.cpp index 27a217748..1bd5689ff 100644 --- a/src/TortoiseProc/Commands/DiffCommand.cpp +++ b/src/TortoiseProc/Commands/DiffCommand.cpp @@ -49,9 +49,9 @@ bool DiffCommand::Execute() if (parser.HasKey(L"startrev") && parser.HasKey(L"endrev")) { if (parser.HasKey(L"unified")) - bRet = !!CAppUtils::StartShowUnifiedDiff(nullptr, cmdLinePath, parser.GetVal(L"endrev"), cmdLinePath, parser.GetVal(L"startrev"), bAlternativeTool); + bRet = !!CAppUtils::StartShowUnifiedDiff(nullptr, cmdLinePath, parser.GetVal(L"startrev"), cmdLinePath, parser.GetVal(L"endrev"), bAlternativeTool); else - bRet = !!CGitDiff::Diff(&cmdLinePath, &cmdLinePath, parser.GetVal(L"startrev"), parser.GetVal(L"endrev"), false, parser.HasKey(L"unified") == TRUE, parser.GetLongVal(L"line"), bAlternativeTool, false); + bRet = !!CGitDiff::Diff(&cmdLinePath, &cmdLinePath, parser.GetVal(L"endrev"), parser.GetVal(L"startrev"), false, parser.HasKey(L"unified") == TRUE, parser.GetLongVal(L"line"), bAlternativeTool, false); } else { @@ -105,7 +105,7 @@ bool DiffCommand::Execute() if (parser.HasKey(L"startrev") && parser.HasKey(L"endrev") && CStringUtils::StartsWith(path2, g_Git.m_CurrentDir + L"\\")) { CTGitPath tgitPath2 = path2.Mid(g_Git.m_CurrentDir.GetLength() + 1); - bRet = !!CGitDiff::Diff(&tgitPath2, &cmdLinePath, parser.GetVal(L"startrev"), parser.GetVal(L"endrev"), false, parser.HasKey(L"unified") == TRUE, parser.GetLongVal(L"line"), bAlternativeTool); + bRet = !!CGitDiff::Diff(&tgitPath2, &cmdLinePath, parser.GetVal(L"endrev"), parser.GetVal(L"startrev"), false, parser.HasKey(L"unified") == TRUE, parser.GetLongVal(L"line"), bAlternativeTool); } else { -- 2.11.4.GIT