From 917f0f8d3a88ab615185e4fea4e44f2293e59f75 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Wed, 24 Aug 2011 03:59:02 +0200 Subject: [PATCH] refactored Signed-off-by: Sven Strickroth --- src/Git/GitStatusListCtrl.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Git/GitStatusListCtrl.cpp b/src/Git/GitStatusListCtrl.cpp index 89207e798..77a7ad273 100644 --- a/src/Git/GitStatusListCtrl.cpp +++ b/src/Git/GitStatusListCtrl.cpp @@ -988,11 +988,13 @@ void CGitStatusListCtrl::AddEntry(CTGitPath * GitPath, WORD /*langID*/, int list { icon_idx = SYS_IMAGE_LIST().GetPathIconIndex(*GitPath); } - // relative path - CString rename; - rename.Format(_T(" (from %s)"),GitPath->GetGitOldPathString()); - if(GitPath->m_Action & (CTGitPath::LOGACTIONS_REPLACED|CTGitPath::LOGACTIONS_COPY) && m_CurrentVersion != GIT_REV_ZERO) - entryname+=rename; + if(GitPath->m_Action & (CTGitPath::LOGACTIONS_REPLACED|CTGitPath::LOGACTIONS_COPY) && !GitPath->GetGitOldPathString().IsEmpty()) + { + // relative path + CString rename; + rename.Format(_T(" (from %s)"), GitPath->GetGitOldPathString()); + entryname += rename; + } InsertItem(index, entryname, icon_idx); -- 2.11.4.GIT