7 #define LOG_INDEX_MAGIC 0x88445566
8 #define LOG_DATA_MAGIC 0x99aa00FF
9 #define LOG_DATA_ITEM_MAGIC 0x0F8899CC
10 #define LOG_DATA_FILE_MAGIC 0x19999FFF
11 #define LOG_INDEX_VERSION 0x4
13 struct SLogCacheIndexHeader
26 struct SLogCacheRevFileHeader
32 struct SLogCacheRevItemHeader
39 #define INDEX_FILE_NAME _T("tortoisegit.index")
40 #define DATA_FILE_NAME _T("tortoisegit.data")
41 #define LOCK_FILE_NAME _T("tortoisegit.lock")
50 BOOL
CheckHeader(SLogCacheIndexHeader
&header
)
52 if(header
.m_Magic
!= LOG_INDEX_MAGIC
)
55 if(header
.m_Version
!= LOG_INDEX_VERSION
)
61 BOOL
CheckHeader(SLogCacheRevFileHeader
&header
)
63 if(header
.m_Magic
!= LOG_DATA_MAGIC
)
66 if(header
.m_Version
!= LOG_INDEX_VERSION
)
72 BOOL
CheckHeader(SLogCacheRevItemHeader
&header
)
74 if(header
.m_Magic
!= LOG_DATA_ITEM_MAGIC
)
77 if(header
.m_Version
!= LOG_INDEX_VERSION
)
83 int SaveOneItem(GitRev
&Rev
,ULONGLONG offset
);
84 int LoadOneItem(GitRev
&Rev
,ULONGLONG offset
);
86 int RebuildCacheFile();
91 int FetchCacheIndex(CString GitDir
);
92 std::vector
<GitRev
> m_NewCacheEntry
;
93 std::map
<CString
, ULONGLONG
> m_HashMapIndex
;
94 int GetCacheData(GitRev
&Rev
);
95 int AddCacheEntry(GitRev
&Rev
);