OSDN Git Service

BrowseRefs: Simplified some code
[tortoisegit/TortoiseGitJp.git] / src / TortoiseShell / ColumnProvider.cpp
index e0b7463..6140362 100644 (file)
@@ -24,7 +24,7 @@
 #include "UnicodeUtils.h"\r
 #include "GitStatus.h"\r
 #include "PathUtils.h"\r
-//#include "..\TSVNCache\CacheInterface.h"\r
+#include "..\TGitCache\CacheInterface.h"\r
 \r
 \r
 const static int ColumnFlags = SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT;\r
@@ -342,15 +342,15 @@ void CShellExt::GetColumnStatus(const TCHAR * path, BOOL bIsDir)
        case ShellCache::exe:\r
                {\r
                        SecureZeroMemory(&itemStatus, sizeof(itemStatus));\r
-                       if(m_remoteCacheLink.GetStatusFromRemoteCache(CTSVNPath(path), &itemStatus, true))\r
+                       if(m_remoteCacheLink.GetStatusFromRemoteCache(CTGitPath(path), &itemStatus, true))\r
                        {\r
-                               filestatus = SVNStatus::GetMoreImportant(itemStatus.m_status.text_status, itemStatus.m_status.prop_status);\r
+                               filestatus = GitStatus::GetMoreImportant(itemStatus.m_status.text_status, itemStatus.m_status.prop_status);\r
                        }\r
                        else\r
                        {\r
                                filestatus = git_wc_status_none;\r
                                columnauthor.clear();\r
-                               columnrev = 0;\r
+                               columnrev = GIT_INVALID_REVNUM;\r
                                itemurl.clear();\r
                                itemshorturl.clear();\r
                                owner.clear();\r
@@ -361,7 +361,7 @@ void CShellExt::GetColumnStatus(const TCHAR * path, BOOL bIsDir)
        case ShellCache::dll:\r
        case ShellCache::dllFull:\r
                {\r
-                       status = m_CachedStatus.GetFullStatus(CTSVNPath(path), bIsDir, TRUE);\r
+                       status = m_CachedStatus.GetFullStatus(CTGitPath(path), bIsDir, TRUE);\r
                        filestatus = status->status;\r
                }\r
                break;\r
@@ -373,7 +373,7 @@ void CShellExt::GetColumnStatus(const TCHAR * path, BOOL bIsDir)
                        else\r
                                filestatus = git_wc_status_none;\r
                        columnauthor.clear();\r
-                       columnrev = 0;\r
+                       columnrev = GIT_INVALID_REVNUM;\r
                        itemurl.clear();\r
                        itemshorturl.clear();\r
                        owner.clear();\r
@@ -423,7 +423,7 @@ void CShellExt::GetColumnStatus(const TCHAR * path, BOOL bIsDir)
                        // Note: this will strip too much if such a folder is *below* the repository\r
                        // root - but it's called 'short url' and we're free to shorten it the way we\r
                        // like :)\r
-                       ptr = _tcsstr(urlComponents.lpszUrlPath, _T("/trunk"));\r
+                       /*ptr = _tcsstr(urlComponents.lpszUrlPath, _T("/trunk"));\r
                        if (ptr == NULL)\r
                                ptr = _tcsstr(urlComponents.lpszUrlPath, _T("\\trunk"));\r
                        if ((ptr == NULL)||((*(ptr+6) != 0)&&(*(ptr+6) != '/')&&(*(ptr+6) != '\\')))\r
@@ -442,7 +442,7 @@ void CShellExt::GetColumnStatus(const TCHAR * path, BOOL bIsDir)
                        }\r
                        if (ptr)\r
                                itemshorturl = ptr;\r
-                       else\r
+                       else*/\r
                                itemshorturl = urlComponents.lpszUrlPath;\r
                }\r
                else \r