From 063e17b0938ea1527d062703427ff38ee9739e3e Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Fri, 1 Feb 2019 18:56:57 +0100 Subject: [PATCH] Don't show add executable and symlink if we just added either of both Signed-off-by: Sven Strickroth --- src/TortoiseProc/ProgressCommands/AddProgressCommand.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/TortoiseProc/ProgressCommands/AddProgressCommand.cpp b/src/TortoiseProc/ProgressCommands/AddProgressCommand.cpp index 6d19b63d4..3155c1f35 100644 --- a/src/TortoiseProc/ProgressCommands/AddProgressCommand.cpp +++ b/src/TortoiseProc/ProgressCommands/AddProgressCommand.cpp @@ -126,12 +126,15 @@ bool AddProgressCommand::Run(CGitProgressList* list, CString& sWindowTitle, int& sCmd.Format(L"/command:commit /path:\"%s\"", (LPCTSTR)g_Git.m_CurrentDir); CAppUtils::RunTortoiseGitProc(sCmd); }); - postCmdList.emplace_back(IDI_ADD, IDS_STATUSLIST_CONTEXT_ADD_EXE, [this] { - SetFileMode(GIT_FILEMODE_BLOB_EXECUTABLE); - }); - postCmdList.emplace_back(IDI_ADD, IDS_STATUSLIST_CONTEXT_ADD_LINK, [this] { - SetFileMode(GIT_FILEMODE_LINK); - }); + if (!(m_bExecutable || m_bSymlink)) + { + postCmdList.emplace_back(IDI_ADD, IDS_STATUSLIST_CONTEXT_ADD_EXE, [this] { + SetFileMode(GIT_FILEMODE_BLOB_EXECUTABLE); + }); + postCmdList.emplace_back(IDI_ADD, IDS_STATUSLIST_CONTEXT_ADD_LINK, [this] { + SetFileMode(GIT_FILEMODE_LINK); + }); + } }; return true; -- 2.11.4.GIT