From faab146da99fb8cfb617ca2ffc185a21f4e79813 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Thu, 5 Feb 2009 16:13:51 +0800 Subject: [PATCH 1/1] Fix Issue 27: Deleted files not committed Signed-off-by: Frank Li --- src/TortoiseProc/CommitDlg.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index a193f78..a8550b7 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -395,7 +395,13 @@ void CCommitDlg::OnOK() bCheckedInExternal = true; } #endif - cmd.Format(_T("git.exe update-index --add -- \"%s\""),entry->GetGitPathString()); + if( entry->m_Action & CTGitPath::LOGACTIONS_ADDED) + cmd.Format(_T("git.exe update-index --add -f -- \"%s\""),entry->GetGitPathString()); + else if ( entry->m_Action & CTGitPath::LOGACTIONS_DELETED) + cmd.Format(_T("git.exe update-index --remove -- \"%s\""),entry->GetGitPathString()); + else + cmd.Format(_T("git.exe update-index -- \"%s\""),entry->GetGitPathString()); + g_Git.Run(cmd,&out,CP_OEMCP); nchecked++; //checkedLists.insert(entry->GetGitPathString()); -- 2.11.0