sMode = _T("-");\r
}\r
\r
+ // NOTE: there seems to be some issue with msys based app receiving backslash on commandline, at least\r
+ // if followed by " like for example 'igit "C:\"', the commandline igit receives is 'igit.exe C:" status' with\r
+ // the 'C:" status' part as a single arg, Maybe it uses unix style processing. In order to avoid this just\r
+ // use forward slashes for supplied project and sub paths\r
+\r
+ CString sProjectPath = pszProjectPath;\r
+ sProjectPath.Replace(_T('\\'), _T('/'));\r
+\r
if (pszSubPath)\r
- cmd.Format(_T("igit.exe \"%s\" status %s \"%s\""), pszProjectPath, sMode, pszSubPath);\r
+ {\r
+ CString sSubPath = pszSubPath;\r
+ sSubPath.Replace(_T('\\'), _T('/'));\r
+\r
+ cmd.Format(_T("igit.exe \"%s\" status %s \"%s\""), sProjectPath, sMode, sSubPath);\r
+ }\r
else\r
- cmd.Format(_T("igit.exe \"%s\" status %s"), pszProjectPath, sMode);\r
+ {\r
+ cmd.Format(_T("igit.exe %s status %s"), sProjectPath, sMode);\r
+ }\r
+\r
+ //OutputDebugStringA("---");OutputDebugStringW(cmd);OutputDebugStringA("\r\n");\r
\r
W_GitCall.SetCmd(cmd);\r
// NOTE: should igit get added as a part of msysgit then use below line instead of the above one\r
if(PathFileExists(sDirName + _T("\\.git")))\r
{\r
if(ProjectTopDir)\r
+ {\r
*ProjectTopDir=sDirName;\r
+ // Make sure to add the trailing slash to root paths such as 'C:'\r
+ if (sDirName.GetLength() == 2 && sDirName[1] == ':')\r
+ (*ProjectTopDir) += _T("\\");\r
+ }\r
return true;\r
}\r
sDirName = sDirName.Left(sDirName.ReverseFind('\\'));\r
\r
//if (lpszSubPath) MessageBoxA(NULL, lpszSubPath, "BuildCache", MB_OK);\r
//MessageBoxA(NULL, CStringA(sProjectRoot), sSubPath, MB_OK);\r
+//OutputDebugStringA("---");OutputDebugStringW(sProjectRoot);OutputDebugStringA(" = ");OutputDebugStringW(filepath.GetWinPathString());OutputDebugStringA(" - ");OutputDebugStringW(sSubPath);OutputDebugStringA("\r\n");\r
err = !wgEnumFiles(sProjectRoot, lpszSubPath, WGEFF_NoRecurse|WGEFF_FullPath|WGEFF_DirStatusAll, &fillstatusmap, this);\r
\r
/*err = svn_client_status4 (&youngest,\r