From 35fc62bc95c61b326174793ca7fa3a6fe6381f12 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Thu, 13 Jan 2022 13:45:05 +0100 Subject: [PATCH] Don't pass "--parents" to git log when full-history is enabled (relates to issue #3728) Signed-off-by: Sven Strickroth --- src/Git/Git.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Git/Git.cpp b/src/Git/Git.cpp index 5934db4d0..5740cead7 100644 --- a/src/Git/Git.cpp +++ b/src/Git/Git.cpp @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2008-2021 - TortoiseGit +// Copyright (C) 2008-2022 - TortoiseGit // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -1039,6 +1039,8 @@ CString CGit::GetLogCmd(CString range, const CTGitPath* path, int mask, CFilterD if (mask & CGit::LOG_INFO_FULL_HISTORY) param += " --full-history"; + else + param += " --parents"; // cf. issue #3728 if(mask& CGit::LOG_INFO_FOLLOW) param += L" --follow"; @@ -1096,7 +1098,7 @@ CString CGit::GetLogCmd(CString range, const CTGitPath* path, int mask, CFilterD if (path) file.Format(L" \"%s\"", static_cast(path->GetGitPathString())); // gitdll.dll:setup_revisions() only looks at args[1] and greater. To account for this, pass a dummy parameter in the 0th place - cmd.Format(L"-z%s %s --parents --%s", static_cast(param), static_cast(range), static_cast(file)); + cmd.Format(L"-z%s %s --%s", static_cast(param), static_cast(range), static_cast(file)); return cmd; } -- 2.11.4.GIT