OSDN Git Service

Handle Rename case when rename files is in difference dir
authorFrank Li <lznuaa@gmail.com>
Tue, 20 Jan 2009 07:31:06 +0000 (15:31 +0800)
committerFrank Li <lznuaa@gmail.com>
Tue, 20 Jan 2009 07:31:06 +0000 (15:31 +0800)
src/Git/TGitPath.cpp
src/TortoiseProc/TortoiseProc.vcproj.FSL.B20596.user

index df743b3..418f236 100644 (file)
@@ -946,7 +946,16 @@ int CTGitPathList::ParserFromLog(CString &log)
                        int rename=one.Find(_T(" => "));\r
                        if(rename>0)\r
                        {\r
-                               path.SetFromGit(one.Right(one.GetLength()-rename-4),&one.Left(rename));\r
+                               CString basepath;\r
+                               int include_left=one.Find(_T("/{"));\r
+                               if(include_left>0)\r
+                               {\r
+                                       basepath=one.Left(include_left+1);\r
+                                       CString newname=basepath+one.Mid(rename+4,one.GetLength()-rename-5);\r
+                                       CString oldname=basepath+one.Mid(include_left+2,rename-include_left-2);\r
+                                       path.SetFromGit(newname,&oldname        );\r
+                               }else\r
+                                       path.SetFromGit(one.Right(one.GetLength()-rename-4),&one.Left(rename));\r
                        }else\r
                                path.SetFromGit(one);\r
                                \r
index 271096d..5e21fdd 100644 (file)
@@ -2,7 +2,7 @@
 <VisualStudioUserFile\r
        ProjectType="Visual C++"\r
        Version="9.00"\r
-       ShowAllFiles="false"\r
+       ShowAllFiles="true"\r
        >\r
        <Configurations>\r
                <Configuration\r
@@ -11,7 +11,7 @@
                        <DebugSettings\r
                                Command="$(TargetPath)"\r
                                WorkingDirectory="D:\Profiles\b20596\tortoisegit"\r
-                               CommandArguments="/command:commit /path:&quot;D:\\test4\\tt&quot;"\r
+                               CommandArguments="/command:log /path:&quot;D:\profile\b20596\buildtest\tortoisegit&quot;"\r
                                Attach="false"\r
                                DebuggerType="3"\r
                                Remote="1"\r