From 61f6d1c7455912c5d742ac7c452e73c8f8b614bb Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Wed, 19 Nov 2014 15:31:18 +0100 Subject: [PATCH] Fixed issue #2348: Conflicts during rebase appends "conflicts" to commit message Regression of commit 1f85a7bf27b8d19274f2e03bd9b8c2a5d165af92. Signed-off-by: Sven Strickroth --- src/Changelog.txt | 1 + src/TortoiseProc/RebaseDlg.cpp | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index d8ee49387..a3d115c22 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -38,6 +38,7 @@ Released: unreleased * Fixed issue #2311: Empty commits cannot be rebased * Fixed issue #2312: Fix UTF-8 AutoCRLF issues with libgit2 * Fixed issue #2345: The Show Log dialog's View Patch side window is empty when the Working dir changes line is selected and no file is selected + * Fixed issue #2348: Conflicts during rebase appends "conflicts" to commit message = Release 1.8.11.0 = Released: 2014-08-22 diff --git a/src/TortoiseProc/RebaseDlg.cpp b/src/TortoiseProc/RebaseDlg.cpp index 64ffde63a..af4476771 100644 --- a/src/TortoiseProc/RebaseDlg.cpp +++ b/src/TortoiseProc/RebaseDlg.cpp @@ -1955,11 +1955,16 @@ LRESULT CRebaseDlg::OnRebaseUpdateUI(WPARAM,LPARAM) if (m_pTaskbarList) m_pTaskbarList->SetProgressState(m_hWnd, TBPF_ERROR); this->m_LogMessageCtrl.Call(SCI_SETREADONLY, FALSE); - CString dotGitPath; - g_GitAdminDir.GetAdminDirPath(g_Git.m_CurrentDir, dotGitPath); CString logMessage; - bool loadedMsg = CGit::LoadTextFile(dotGitPath + _T("MERGE_MSG"), logMessage); - if (!loadedMsg) + if (m_IsCherryPick) + { + CString dotGitPath; + g_GitAdminDir.GetAdminDirPath(g_Git.m_CurrentDir, dotGitPath); + // vanilla git also re-uses MERGE_MSG on conflict (listing all conflicted files) + // and it's also needed for cherry-pick in order to get cherry-picked-from included on conflicts + CGit::LoadTextFile(dotGitPath + _T("MERGE_MSG"), logMessage); + } + if (logMessage.IsEmpty()) logMessage = curRev->GetSubject() + _T("\n") + curRev->GetBody(); this->m_LogMessageCtrl.SetText(logMessage); break; -- 2.11.4.GIT