OSDN Git Service

Fix PathList Miss Problem
authorFrank Li <lznuaa@gmail.com>
Fri, 12 Dec 2008 14:37:19 +0000 (22:37 +0800)
committerFrank Li <lznuaa@gmail.com>
Fri, 12 Dec 2008 14:37:19 +0000 (22:37 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/Commands/CommitCommand.cpp
src/TortoiseProc/Commands/LogCommand.cpp
src/TortoiseProc/TortoiseProc.cpp

index 80c7ece..60d6f50 100644 (file)
@@ -66,6 +66,9 @@ bool CommitCommand::Execute()
                }\r
        }\r
 #endif\r
+       if(pathList.GetCount()>0)\r
+               g_Git.m_CurrentDir=pathList[0].GetWinPathString();\r
+       \r
        while (bFailed)\r
        {\r
                bFailed = false;\r
index e19501e..cea3782 100644 (file)
@@ -64,7 +64,11 @@ bool LogCommand::Execute()
        {\r
                bStrict = TRUE;\r
        }\r
-#endif\r
+#endif \r
+       \r
+       if(pathList.GetCount()>0)\r
+               g_Git.m_CurrentDir=pathList[0].GetWinPathString();\r
+       \r
        CLogDlg dlg;\r
        theApp.m_pMainWnd = &dlg;\r
 //     dlg.SetParams(cmdLinePath, pegrev, revstart, revend, limit, bStrict);\r
index 6ee7fb0..8dd922d 100644 (file)
@@ -239,7 +239,7 @@ BOOL CTortoiseProcApp::InitInstance()
        CTGitPathList pathList;\r
        if ( parser.HasKey(_T("pathfile")) )\r
        {\r
-#if 0\r
+\r
                CString sPathfileArgument = CPathUtils::GetLongPathname(parser.GetVal(_T("pathfile")));\r
                cmdLinePath.SetFromUnknown(sPathfileArgument);\r
                if (pathList.LoadFromFile(cmdLinePath)==false)\r
@@ -252,7 +252,7 @@ BOOL CTortoiseProcApp::InitInstance()
                // This was a path to a temporary file - it's got no meaning now, and\r
                // anybody who uses it again is in for a problem...\r
                cmdLinePath.Reset();\r
-#endif\r
+\r
        }\r
        else\r
        {\r