From 28591d670a944fc651d8c563b69df016ff6dd9c3 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 8 Jul 2017 17:33:05 +0200 Subject: [PATCH] Don't report locally deleted file twice (once as deleted and once as unversioned) Signed-off-by: Sven Strickroth --- src/Git/GitStatusListCtrl.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Git/GitStatusListCtrl.cpp b/src/Git/GitStatusListCtrl.cpp index 350fd6963..758cbf12b 100644 --- a/src/Git/GitStatusListCtrl.cpp +++ b/src/Git/GitStatusListCtrl.cpp @@ -3748,6 +3748,24 @@ int CGitStatusListCtrl::UpdateUnRevFileList(const CTGitPathList* List) return -1; } + if (m_StatusFileList.m_Action & CTGitPath::LOGACTIONS_DELETED) + { + int unrev = 0; + int status = 0; + while (unrev < m_UnRevFileList.GetCount() && status < m_StatusFileList.GetCount()) + { + auto cmp = CTGitPath::Compare(m_UnRevFileList[unrev], m_StatusFileList[status]); + if (cmp < 1) + { + ++unrev; + continue; + } + if (cmp == 1) + m_UnRevFileList.RemovePath(m_StatusFileList[status]); + ++status; + } + } + for (int i = 0; i < m_UnRevFileList.GetCount(); ++i) { auto gitpatch = const_cast(&m_UnRevFileList[i]); -- 2.11.4.GIT