OSDN Git Service

Fix Issue 77: "Show differencess" against a deleted file will cause TortoiseMerge...
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / GitDiff.cpp
index 49ea5e6..3f45e1f 100644 (file)
@@ -28,7 +28,7 @@ int CGitDiff::Parser(git_revnum_t &rev)
        }\r
        return 0;\r
 }\r
-int CGitDiff::DiffNull(CTGitPath *pPath, git_revnum_t &rev1)\r
+int CGitDiff::DiffNull(CTGitPath *pPath, git_revnum_t &rev1,bool bIsAdd)\r
 {\r
        CString temppath;\r
        GetTempPath(temppath);\r
@@ -56,10 +56,17 @@ int CGitDiff::DiffNull(CTGitPath *pPath, git_revnum_t &rev1)
        file.Close();\r
        \r
        CAppUtils::DiffFlags flags;\r
-       CAppUtils::StartExtDiff(tempfile,file1,\r
+\r
+       if(bIsAdd)\r
+               CAppUtils::StartExtDiff(tempfile,file1,\r
                                                        _T("NULL"),\r
                                                        pPath->GetGitPathString()+_T(":")+rev1.Left(6)\r
                                                        ,flags);\r
+       else\r
+               CAppUtils::StartExtDiff(file1,tempfile,\r
+                                                       pPath->GetGitPathString()+_T(":")+rev1.Left(6)\r
+                                                       ,_T("NULL"),flags);\r
+\r
        return 0;\r
 }\r
 \r