From 41c160874026f7420f14b8264281deb5b17ebf6b Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 3 Aug 2014 18:12:51 +0200 Subject: [PATCH] Do not show post action cmds if not in dry-run mode Signed-off-by: Sven Strickroth --- src/TortoiseProc/Commands/CleanupCommand.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TortoiseProc/Commands/CleanupCommand.cpp b/src/TortoiseProc/Commands/CleanupCommand.cpp index 2a42424e0..517c1caa2 100644 --- a/src/TortoiseProc/Commands/CleanupCommand.cpp +++ b/src/TortoiseProc/Commands/CleanupCommand.cpp @@ -178,13 +178,13 @@ static bool DoCleanUp(const CTGitPathList& pathList, int cleanType, bool bDir, b progress.m_PostCmdCallback = [&](DWORD status, PostCmdList& postCmdList) { - if (status && !bDryRun) + if (status) postCmdList.push_back(PostCmd(IDS_MSGBOX_RETRY, [&]{ DoCleanUp(pathList, cleanType, bDir, bSubmodules, bDryRun, bNoRecycleBin); })); - if (status) + if (status || !bDryRun) return; - if (bNoRecycleBin) // recheck, I don't really understand this. why rerun with same options first? + if (bNoRecycleBin) { postCmdList.push_back(PostCmd(IDS_CLEAN_NO_RECYCLEBIN, [&]{ DoCleanUp(pathList, cleanType, bDir, bSubmodules, FALSE, TRUE); })); postCmdList.push_back(PostCmd(IDS_CLEAN_TO_RECYCLEBIN, [&]{ DoCleanUp(pathList, cleanType, bDir, bSubmodules, FALSE, FALSE); })); -- 2.11.4.GIT