From c4949eb493a3735aa5cc0b278ff978b6359a6c2b Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Tue, 24 Jan 2012 00:02:10 +0100 Subject: [PATCH] use massive git helper for adding files Signed-off-by: Sven Strickroth --- src/TortoiseProc/GitProgressDlg.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/TortoiseProc/GitProgressDlg.cpp b/src/TortoiseProc/GitProgressDlg.cpp index 991ed0b0b..6b61d8da1 100644 --- a/src/TortoiseProc/GitProgressDlg.cpp +++ b/src/TortoiseProc/GitProgressDlg.cpp @@ -42,6 +42,7 @@ #include "IconMenu.h" #include "BugTraqAssociations.h" #include "patch.h" +#include "MassiveGitTask.h" #include "git2.h" #include "SmartHandle.h" @@ -1906,18 +1907,8 @@ bool CGitProgressDlg::CmdAdd(CString& sWindowTitle, bool& localoperation) } else { - for(int i = 0; i < m_targetPathList.GetCount(); i++) - { - CString cmd, out; - cmd.Format(_T("git.exe add -f -- \"%s\""),m_targetPathList[i].GetGitPathString()); - if(g_Git.Run(cmd, &out, CP_ACP)) - { - MessageBox(out, _T("TortoiseGit"), MB_OK|MB_ICONERROR); - m_bErrorsOccurred = true; - return false; - } - Notify(m_targetPathList[i], git_wc_notify_add); - } + MassiveGitTask mgt(L"add -f"); + mgt.ExecuteWithNotify(&m_targetPathList, m_bCancelled, git_wc_notify_add, this, &CGitProgressDlg::Notify); } CShellUpdater::Instance().AddPathsForUpdate(m_targetPathList); -- 2.11.4.GIT