OSDN Git Service

Handle rename in path {}
authorFrank Li <lznuaa@gmail.com>
Tue, 20 Jan 2009 08:11:45 +0000 (16:11 +0800)
committerFrank Li <lznuaa@gmail.com>
Tue, 20 Jan 2009 08:11:45 +0000 (16:11 +0800)
src/Git/TGitPath.cpp
src/TortoiseProc/TortoiseProc.vcproj.FSL.B20596.user

index 418f236..0d83418 100644 (file)
@@ -947,12 +947,13 @@ int CTGitPathList::ParserFromLog(CString &log)
                        if(rename>0)\r
                        {\r
                                CString basepath;\r
                        if(rename>0)\r
                        {\r
                                CString basepath;\r
-                               int include_left=one.Find(_T("/{"));\r
-                               if(include_left>0)\r
+                               int include_left=one.Find(_T("{"));\r
+                               int include_right=one.Find(_T("}"),rename);\r
+                               if(include_left>0 && include_right>0 )\r
                                {\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
+                                       basepath=one.Left(include_left);\r
+                                       CString newname=basepath+one.Mid(rename+4,include_right-rename-4)+one.Right(one.GetLength()-include_right-1);\r
+                                       CString oldname=basepath+one.Mid(include_left+2,rename-include_left-2)+one.Right(one.GetLength()-include_right-1);\r
                                        path.SetFromGit(newname,&oldname        );\r
                                }else\r
                                        path.SetFromGit(one.Right(one.GetLength()-rename-4),&one.Left(rename));\r
                                        path.SetFromGit(newname,&oldname        );\r
                                }else\r
                                        path.SetFromGit(one.Right(one.GetLength()-rename-4),&one.Left(rename));\r
index 5e21fdd..db909ba 100644 (file)
@@ -11,7 +11,7 @@
                        <DebugSettings\r
                                Command="$(TargetPath)"\r
                                WorkingDirectory="D:\Profiles\b20596\tortoisegit"\r
                        <DebugSettings\r
                                Command="$(TargetPath)"\r
                                WorkingDirectory="D:\Profiles\b20596\tortoisegit"\r
-                               CommandArguments="/command:log /path:&quot;D:\profile\b20596\buildtest\tortoisegit&quot;"\r
+                               CommandArguments="/command:log /path:&quot;D:\Profiles\b20596\buildtest\TortoiseGit&quot;"\r
                                Attach="false"\r
                                DebuggerType="3"\r
                                Remote="1"\r
                                Attach="false"\r
                                DebuggerType="3"\r
                                Remote="1"\r