+ InterlockedExchange(&m_bNoDispUpdates, FALSE);\r
+\r
+ git_get_log_firstcommit(m_DllGitLog);\r
+ int total = git_get_log_estimate_commit_count(m_DllGitLog);\r
+ GIT_COMMIT commit;\r
+ t1=GetTickCount();\r
+\r
+ int oldsize=m_logEntries.size();\r
+ while( git_get_log_nextcommit(this->m_DllGitLog,&commit) == 0)\r
+ {\r
+ //printf("%s\r\n",commit.m_Subject);\r
+ if(m_bExitThread)\r
+ break;\r
+\r
+ CGitHash hash = (char*)commit.m_hash ;\r
+ \r
+ GitRev *pRev = m_LogCache.GetCacheData(hash);\r
+ \r
+ if(pRev == NULL || !pRev->m_IsFull)\r
+ {\r
+ pRev->ParserFromCommit(&commit);\r
+ pRev->ParserParentFromCommit(&commit);\r
+ pRev->SafeFetchFullInfo(&g_Git);\r
+ \r
+ }else\r
+ {\r
+ ASSERT(pRev->m_CommitHash == hash);\r
+ pRev->ParserParentFromCommit(&commit);\r
+ }\r
+#ifdef DEBUG \r
+ pRev->DbgPrint();\r
+ TRACE(_T("\n"));\r
+#endif\r
+ git_free_commit(&commit);\r
+\r
+ this->m_critSec.Lock();\r
+ m_logEntries.push_back(hash);\r
+ m_arShownList.Add(pRev);\r
+ this->m_critSec.Unlock();\r
+\r
+ if(t2-t1>500 || (m_logEntries.size()-oldsize >100))\r
+ {\r
+ //update UI\r
+ int percent=m_logEntries.size()*100/total + GITLOG_START+1;\r
+ if(percent > 99)\r
+ percent =99;\r
+ if(percent < GITLOG_START)\r
+ percent = GITLOG_START +1;\r
+\r
+ oldsize = m_logEntries.size();\r
+ PostMessage(LVM_SETITEMCOUNT, (WPARAM) this->m_logEntries.size(),(LPARAM) LVSICF_NOINVALIDATEALL|LVSICF_NOSCROLL);\r
+ ::PostMessage(this->GetParent()->m_hWnd,MSG_LOAD_PERCENTAGE,(WPARAM) percent,0);\r
+ } \r
+ }\r
+ \r
+ //Update UI;\r
+ PostMessage(LVM_SETITEMCOUNT, (WPARAM) this->m_logEntries.size(),(LPARAM) LVSICF_NOINVALIDATEALL|LVSICF_NOSCROLL);\r
+ ::PostMessage(this->GetParent()->m_hWnd,MSG_LOAD_PERCENTAGE,(WPARAM) GITLOG_END,0);\r
+\r
+ InterlockedExchange(&m_bThreadRunning, FALSE);\r
+\r
+#if 0\r