From 249f6cbb7ecfc2d9325e521be5fe94c1a915887d Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Fri, 13 Jan 2012 14:46:43 +0100 Subject: [PATCH] deduplicate code Signed-off-by: Sven Strickroth --- src/TortoiseProc/CommitDlg.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index e5dabc963..8f36cd196 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -669,16 +669,8 @@ void CCommitDlg::OnOK() m_sLogMessage = sBugID + _T("\n") + m_sLogMessage; } - BOOL bIsMerge=false; - // - CString dotGitPath; - g_GitAdminDir.GetAdminDirPath(g_Git.m_CurrentDir, dotGitPath); - if(PathFileExists(dotGitPath + _T("MERGE_HEAD"))) - { - bIsMerge=true; - } //if(checkedfiles.GetLength()>0) - if( bAddSuccess && (nchecked||m_bCommitAmend||bIsMerge) ) + if (bAddSuccess && (nchecked || m_bCommitAmend || CTGitPath(g_Git.m_CurrentDir).IsMergeActive())) { // cmd.Format(_T("git.exe update-index -- %s"),checkedfiles); // g_Git.Run(cmd,&out); -- 2.11.4.GIT