From 0f1c9a87be97f9d423480e91e74d1c40de039e6c Mon Sep 17 00:00:00 2001 From: Frank Li Date: Thu, 14 May 2009 23:16:50 +0800 Subject: [PATCH] Show "fast forward file" at merged commit Signed-off-by: Frank Li --- src/Git/GitStatusListCtrl.h | 2 +- src/Git/TGitPath.cpp | 12 +++++++++++- src/Git/TGitPath.h | 1 + src/TortoiseProc/gitlogcache.h | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Git/GitStatusListCtrl.h b/src/Git/GitStatusListCtrl.h index c51476d..e119499 100644 --- a/src/Git/GitStatusListCtrl.h +++ b/src/Git/GitStatusListCtrl.h @@ -78,7 +78,7 @@ #define SVNSLC_SHOWDIRECTS (SVNSLC_SHOWDIRECTFILES | SVNSLC_SHOWDIRECTFOLDER) -#define SVNSLC_SHOWVERSIONED (SVNSLC_SHOWNORMAL|SVNSLC_SHOWMODIFIED|\ +#define SVNSLC_SHOWVERSIONED (CTGitPath::LOGACTIONS_FORWORD|SVNSLC_SHOWNORMAL|SVNSLC_SHOWMODIFIED|\ SVNSLC_SHOWADDED|SVNSLC_SHOWREMOVED|SVNSLC_SHOWCONFLICTED|SVNSLC_SHOWMISSING|\ SVNSLC_SHOWREPLACED|SVNSLC_SHOWMERGED|SVNSLC_SHOWIGNORED|SVNSLC_SHOWOBSTRUCTED|\ SVNSLC_SHOWEXTERNAL|SVNSLC_SHOWINCOMPLETE|SVNSLC_SHOWINEXTERNALS|\ diff --git a/src/Git/TGitPath.cpp b/src/Git/TGitPath.cpp index c9dc54c..9bdbed4 100644 --- a/src/Git/TGitPath.cpp +++ b/src/Git/TGitPath.cpp @@ -1039,7 +1039,12 @@ int CTGitPathList::ParserFromLog(BYTE_VECTOR &log) if(GitPath) { GitPath->ParserAction( log[actionstart] ); - GitPath->m_Action |=merged?CTGitPath::LOGACTIONS_MERGED:0; + + if(merged) + { + GitPath->m_Action |= CTGitPath::LOGACTIONS_MERGED; + GitPath->m_Action &= ~CTGitPath::LOGACTIONS_FORWORD; + } m_Action |=GitPath->m_Action; }else @@ -1110,6 +1115,7 @@ int CTGitPathList::ParserFromLog(BYTE_VECTOR &log) //path.SetFromGit(pathname); path.m_StatAdd=StatAdd; path.m_StatDel=StatDel; + path.m_Action |= CTGitPath::LOGACTIONS_FORWORD; AddPath(path); } @@ -1919,6 +1925,10 @@ CString CTGitPath::GetActionName(int action) return _T("Rename"); if(action & CTGitPath::LOGACTIONS_COPY) return _T("Copy"); + + if(action & CTGitPath::LOGACTIONS_FORWORD ) + return _T("Forward"); + if(action & CTGitPath::LOGACTIONS_REBASE_EDIT) return _T("Edit"); if(action & CTGitPath::LOGACTIONS_REBASE_SQUASH) diff --git a/src/Git/TGitPath.h b/src/Git/TGitPath.h index 77f6f35..875ffdb 100644 --- a/src/Git/TGitPath.h +++ b/src/Git/TGitPath.h @@ -19,6 +19,7 @@ public: LOGACTIONS_CACHE = 0x00000020, LOGACTIONS_COPY = 0x00000040, LOGACTIONS_MERGED = 0x00000080, + LOGACTIONS_FORWORD = 0x00000100, LOGACTIONS_UNVER = 0x80000000, LOGACTIONS_IGNORE = 0x40000000, //LOGACTIONS_CONFLICT = 0x20000000, diff --git a/src/TortoiseProc/gitlogcache.h b/src/TortoiseProc/gitlogcache.h index 9d8840e..a3f8289 100644 --- a/src/TortoiseProc/gitlogcache.h +++ b/src/TortoiseProc/gitlogcache.h @@ -8,7 +8,7 @@ #define LOG_DATA_MAGIC 0x99aa00FF #define LOG_DATA_ITEM_MAGIC 0x0F8899CC #define LOG_DATA_FILE_MAGIC 0x19999FFF -#define LOG_INDEX_VERSION 0x4 +#define LOG_INDEX_VERSION 0x5 struct SLogCacheIndexHeader { -- 2.11.0