From 7dbc85a32b08dcb7250850795eb3ba135e67321c Mon Sep 17 00:00:00 2001 From: Yue Lin Ho Date: Sat, 28 Jul 2018 09:17:36 +0800 Subject: [PATCH] SubmoduleSyncCommand no need to inherit SubmoduleCommand Since this commit 6e6976fef4130489d558e3583f842a52a9c779bb Signed-off-by: Yue Lin Ho --- src/TortoiseProc/Commands/SubmoduleCommand.cpp | 6 ++---- src/TortoiseProc/Commands/SubmoduleCommand.h | 10 ++-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/TortoiseProc/Commands/SubmoduleCommand.cpp b/src/TortoiseProc/Commands/SubmoduleCommand.cpp index a6d4a1f1f..87aefc02e 100644 --- a/src/TortoiseProc/Commands/SubmoduleCommand.cpp +++ b/src/TortoiseProc/Commands/SubmoduleCommand.cpp @@ -174,7 +174,7 @@ bool SubmoduleUpdateCommand::Execute() return !progress.m_GitStatus; } -bool SubmoduleCommand::Execute(CString cmd, CString arg) +bool SubmoduleSyncCommand::Execute() { CProgressDlg progress; theApp.m_pMainWnd = &progress; @@ -201,14 +201,12 @@ bool SubmoduleCommand::Execute(CString cmd, CString arg) g_Git.m_CurrentDir=super; - //progress.m_GitCmd.Format(L"git.exe submodule update --init "); - CString str; for (int i = 0; i < this->orgPathList.GetCount(); ++i) { if(orgPathList[i].IsDirectory()) { - str.Format(L"git.exe submodule %s %s -- \"%s\"", (LPCTSTR)cmd, (LPCTSTR)arg, (LPCTSTR)((CTGitPath &)orgPathList[i]).GetSubPath(CTGitPath(super)).GetGitPathString()); + str.Format(L"git.exe submodule sync -- \"%s\"", (LPCTSTR)((CTGitPath &)orgPathList[i]).GetSubPath(CTGitPath(super)).GetGitPathString()); progress.m_GitCmdList.push_back(str); } } diff --git a/src/TortoiseProc/Commands/SubmoduleCommand.h b/src/TortoiseProc/Commands/SubmoduleCommand.h index ecbd77f5d..872388182 100644 --- a/src/TortoiseProc/Commands/SubmoduleCommand.h +++ b/src/TortoiseProc/Commands/SubmoduleCommand.h @@ -28,12 +28,6 @@ public: virtual bool Execute() override; }; -class SubmoduleCommand:public Command -{ -public: - bool Execute(CString cmd, CString arg = L""); -}; - class SubmoduleUpdateCommand : public Command { public: @@ -43,13 +37,13 @@ public: virtual bool Execute() override; }; -class SubmoduleSyncCommand : public SubmoduleCommand +class SubmoduleSyncCommand : public Command { public: /** * Executes the command. */ - virtual bool Execute() override { return SubmoduleCommand::Execute(L"sync"); }; + virtual bool Execute() override; }; -- 2.11.4.GIT