OSDN Git Service

Fix File List Del\Add switch problem and enable prevdiff command
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / LogDataVector.cpp
index 1f9b340..e33cea1 100644 (file)
 //#include "EditPropertiesDlg.h"
 #include "FileDiffDlg.h"
 
+int CLogDataVector::ParserShortLog(CTGitPath *path ,int count  )
+{
+       CString log;
+       GitRev rev;
+
+       CString begin;
+       begin.Format(_T("#<%c>"),LOG_REV_ITEM_BEGIN);
+
+       g_Git.GetShortLog(log,path,count);
+       if(log.GetLength()==0)
+               return 0;
+       
+       int start=4;
+       int length;
+       int next =1;
+       while( next>0 )
+       {
+               next=log.Find(begin,start);
+               if(next >0 )
+                       length = next - start+4;
+               else
+                       length = log.GetLength()-start+4;
+
+               CString onelog =log;
+               onelog=log.Mid(start -4,length);
+               rev.ParserFromLog(onelog);
+               rev.m_Subject=_T("Load .................................");
+               this->push_back(rev);
+               m_HashMap[rev.m_CommitHash]=size()-1;
+               start = next +4;
+       }
+
+       return 0;
+       return 0;
+
+}
+int CLogDataVector::FetchFullInfo(int i)
+{
+       return at(i).SafeFetchFullInfo(&g_Git);
+}
 //CLogDataVector Class
 int CLogDataVector::ParserFromLog()
 {
        CString log;
        GitRev rev;
-       g_Git.GetLog(log);
+       CString emptyhash;
+       g_Git.GetLog(log,emptyhash);
 
        CString begin;
        begin.Format(_T("#<%c>"),LOG_REV_ITEM_BEGIN);
@@ -91,7 +132,7 @@ int CLogDataVector::ParserFromLog()
                onelog=log.Mid(start -4,length);
                rev.ParserFromLog(onelog);
                this->push_back(rev);
-               m_HashMap[rev.m_CommitHash]=&rev;
+               m_HashMap[rev.m_CommitHash]=size()-1;
                start = next +4;
        }