OSDN Git Service

All configurations (Release/Debug and x86/x64) can be built properly.
[tortoisegit/TortoiseGitJp.git] / src / Git / TGitPath.cpp
index c3a5444..7c7e43c 100644 (file)
@@ -128,6 +128,18 @@ void CTGitPath::SetFromGit(const char* pPath, bool bIsDirectory)
        m_bIsDirectory = bIsDirectory;\r
 }\r
 \r
+void CTGitPath::SetFromGit(const TCHAR* pPath, bool bIsDirectory)\r
+{\r
+       Reset();\r
+       if (pPath)\r
+       {\r
+               m_sFwdslashPath = pPath;\r
+               SanitizeRootPath(m_sFwdslashPath, true);\r
+       }\r
+       m_bDirectoryKnown = true;\r
+       m_bIsDirectory = bIsDirectory;\r
+}\r
+\r
 void CTGitPath::SetFromGit(const CString& sPath,CString *oldpath)\r
 {\r
        Reset();\r
@@ -1865,30 +1877,35 @@ CTGitPath * CTGitPathList::LookForGitPath(CString path)
        }\r
        return NULL;\r
 }\r
-\r
-CString CTGitPath::GetActionName()\r
+CString CTGitPath::GetActionName(int action)\r
 {\r
-       if(m_Action  & CTGitPath::LOGACTIONS_ADDED)\r
+       if(action  & CTGitPath::LOGACTIONS_UNMERGED)\r
+               return _T("Conflict");\r
+       if(action  & CTGitPath::LOGACTIONS_ADDED)\r
                return _T("Added");\r
-       if(m_Action  & CTGitPath::LOGACTIONS_DELETED)\r
+       if(action  & CTGitPath::LOGACTIONS_DELETED)\r
                return _T("Deleted");\r
-       if(m_Action  & CTGitPath::LOGACTIONS_UNMERGED)\r
-               return _T("Conflict");\r
-       if(m_Action  & CTGitPath::LOGACTIONS_MODIFIED)\r
+       if(action  & CTGitPath::LOGACTIONS_MODIFIED)\r
                return _T("Modified");\r
-       if(m_Action  & CTGitPath::LOGACTIONS_REPLACED)\r
+       if(action  & CTGitPath::LOGACTIONS_REPLACED)\r
                return _T("Rename");\r
-       if(m_Action  & CTGitPath::LOGACTIONS_COPY)\r
+       if(action  & CTGitPath::LOGACTIONS_COPY)\r
                return _T("Copy");\r
-       if(m_Action & CTGitPath::LOGACTIONS_REBASE_EDIT)\r
+       if(action & CTGitPath::LOGACTIONS_REBASE_EDIT)\r
                return _T("Edit");\r
-       if(m_Action & CTGitPath::LOGACTIONS_REBASE_SQUASH)\r
+       if(action & CTGitPath::LOGACTIONS_REBASE_SQUASH)\r
                return _T("Squash");\r
-       if(m_Action & CTGitPath::LOGACTIONS_REBASE_PICK)\r
+       if(action & CTGitPath::LOGACTIONS_REBASE_PICK)\r
                return _T("Pick");\r
+       if(action & CTGitPath::LOGACTIONS_REBASE_SKIP)\r
+               return _T("Skip");\r
 \r
        return _T("Unknown");\r
 }\r
+CString CTGitPath::GetActionName()\r
+{\r
+       return GetActionName(m_Action);\r
+}\r
 \r
 int CTGitPathList::GetAction()\r
 {\r