OSDN Git Service

Fixed issue #234: First log(first commit in history) was missing...
authorFrank Li <lznuaa@gmail.com>
Mon, 30 Nov 2009 14:32:40 +0000 (22:32 +0800)
committerFrank Li <lznuaa@gmail.com>
Mon, 30 Nov 2009 14:32:40 +0000 (22:32 +0800)
FetchShortLog set vector size as commits number. Miss work copy item

Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/GitLogListBase.cpp
src/TortoiseProc/LogDataVector.cpp
src/TortoiseProc/LogDlgHelper.h

index 986c780..04ebca9 100644 (file)
@@ -1765,7 +1765,7 @@ int CGitLogListBase::FillGitShortLog()
        if(m_bShowWC)\r
                this->m_logEntries.insert(m_logEntries.begin(),this->m_wcRev);\r
 \r
-       this->m_logEntries.FetchShortLog(path,m_StartRef,-1,mask);\r
+       this->m_logEntries.FetchShortLog(path,m_StartRef,-1,mask,m_bShowWC?1:0);\r
 \r
        //this->m_logEntries.ParserFromLog();\r
        if(IsInWorkingThread())\r
index 84e89ca..35057e4 100644 (file)
@@ -112,7 +112,7 @@ int CLogDataVector::ParserShortLog(CTGitPath *path ,CString &hash,int count ,int
        return 0;\r
 \r
 }\r
-int CLogDataVector::FetchShortLog(CTGitPath *path ,CString &hash,int count ,int mask )\r
+int CLogDataVector::FetchShortLog(CTGitPath *path ,CString &hash,int count ,int mask, int ShowWC )\r
 {\r
        //BYTE_VECTOR log;\r
        m_RawlogData.clear();\r
@@ -152,7 +152,7 @@ int CLogDataVector::FetchShortLog(CTGitPath *path ,CString &hash,int count ,int
                //next=log.find(0,next);\r
        }\r
 \r
-       resize(m_RawLogStart.size());\r
+       resize(m_RawLogStart.size() + ShowWC);\r
 \r
        t2=GetTickCount();\r
 \r
index 031c51c..1b0e56c 100644 (file)
@@ -61,7 +61,7 @@ public:
        int  ParserFromLog(CTGitPath *path =NULL,int count = -1,int infomask=CGit::LOG_INFO_STAT|CGit::LOG_INFO_FILESTATE|CGit::LOG_INFO_SHOW_MERGEDFILE,\r
                                                                                         CString *from=NULL,CString *to=NULL);\r
 \r
-       int  FetchShortLog(CTGitPath *path , CString &hash,int count=-1 ,int mask=CGit::LOG_INFO_ONLY_HASH );\r
+       int  FetchShortLog(CTGitPath *path , CString &hash,int count=-1 ,int mask=CGit::LOG_INFO_ONLY_HASH, int showWC=0 );\r
        int  ParserShortLog(CTGitPath *path ,CString &hash,int count=-1 ,int mask=CGit::LOG_INFO_ONLY_HASH );\r
 \r
        int  ParserFromRefLog(CString ref);\r