OSDN Git Service

Add return value handle of format patch
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / Commands / PrevDiffCommand.cpp
index 096f494..4a35ea4 100644 (file)
@@ -49,7 +49,8 @@ bool PrevDiffCommand::Execute()
                        CString logout;\r
                \r
                        CLogDataVector revs;\r
-                       revs.ParserShortLog(&cmdLinePath,2);\r
+       \r
+                       revs.ParserShortLog(&cmdLinePath,hash,2);\r
                        if( revs.size() == 0)\r
                        {\r
                                CMessageBox::Show(hWndExplorer, IDS_ERR_NOPREVREVISION, IDS_APPNAME, MB_ICONERROR);\r
@@ -59,13 +60,13 @@ bool PrevDiffCommand::Execute()
                        if( revs.size() == 1 )\r
                        {\r
                                CGitDiff diff;\r
-                               bRet = diff.DiffNull(&cmdLinePath,revs[0].m_CommitHash);\r
+                               bRet = (diff.DiffNull(&cmdLinePath,revs[0].m_CommitHash) != 0);\r
                        }\r
 \r
                        if( revs.size() == 2 )\r
                        {\r
                                CGitDiff diff;\r
-                               bRet = diff.Diff(&cmdLinePath, revs[0].m_CommitHash, revs[1].m_CommitHash, false);\r
+                               bRet = diff.Diff(&cmdLinePath,&cmdLinePath, revs[0].m_CommitHash, revs[1].m_CommitHash, false);\r
                        }\r
                }\r
                else\r