OSDN Git Service

Use Temp file as logmesage
authorFrank Li <lznuaa@gmail.com>
Thu, 27 Nov 2008 00:09:08 +0000 (08:09 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 27 Nov 2008 00:09:08 +0000 (08:09 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
TortoiseProc/CommitDlg.cpp

index 1834900..9eb846b 100644 (file)
@@ -423,8 +423,16 @@ void CCommitDlg::OnOK()
                g_Git.Run(cmd,&out);\r
        }\r
 \r
-       cmd.Format(_T("git.cmd commit -m \"%s\""), m_sLogMessage);\r
+       CString tempfile=::GetTempFile();\r
+       CStdioFile file(tempfile,CFile::modeReadWrite|CFile::modeCreate );\r
+       file.WriteString(m_sLogMessage);\r
+       file.Close();\r
+\r
+       out =_T("");\r
+       cmd.Format(_T("git.cmd commit -F \"%s\""), tempfile);\r
        g_Git.Run(cmd,&out);\r
+\r
+       \r
        \r
        CMessageBox::Show(this->m_hWnd, out, _T("Commit Finish"), MB_YESNO | MB_ICONINFORMATION);\r
 \r