OSDN Git Service

Fix Don't add unversion problem at CommitDlg
authorFrank Li <lznuaa@gmail.com>
Sat, 7 Feb 2009 16:07:52 +0000 (00:07 +0800)
committerFrank Li <lznuaa@gmail.com>
Sat, 7 Feb 2009 16:07:52 +0000 (00:07 +0800)
This problem happen again because wrong handle add case when fix don't commit delete file problem.

Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/CommitDlg.cpp

index a8550b7..23e53da 100644 (file)
@@ -395,8 +395,8 @@ void CCommitDlg::OnOK()
                                bCheckedInExternal = true;\r
                        }\r
 #endif\r
                                bCheckedInExternal = true;\r
                        }\r
 #endif\r
-                       if( entry->m_Action & CTGitPath::LOGACTIONS_ADDED)\r
-                               cmd.Format(_T("git.exe update-index --add -f -- \"%s\""),entry->GetGitPathString());\r
+                       if( entry->m_Action & CTGitPath::LOGACTIONS_UNVER)\r
+                               cmd.Format(_T("git.exe add -f -- \"%s\""),entry->GetGitPathString());\r
                        else if ( entry->m_Action & CTGitPath::LOGACTIONS_DELETED)\r
                                cmd.Format(_T("git.exe update-index --remove -- \"%s\""),entry->GetGitPathString());\r
                        else\r
                        else if ( entry->m_Action & CTGitPath::LOGACTIONS_DELETED)\r
                                cmd.Format(_T("git.exe update-index --remove -- \"%s\""),entry->GetGitPathString());\r
                        else\r