From 642900548406b5536443428dac298fe6b847bd51 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Mon, 4 Apr 2011 00:59:43 +0200 Subject: [PATCH] restore old behavior (diff to last commit) for commits with no or more parents Signed-off-by: Sven Strickroth --- src/TortoiseProc/CommitDlg.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index c14d13fbd..03ef657bb 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -344,6 +344,16 @@ BOOL CCommitDlg::OnInitDialog() GetDlgItem(IDC_COMMIT_AMENDDIFF)->ShowWindow(SW_SHOW); } + CGitHash hash = g_Git.GetHash(_T("HEAD")); + GitRev f; + f.GetParentFromHash(hash); + if (f.ParentsCount() != 1) + { + m_bAmendDiffToLastCommit = true; + UpdateData(FALSE); + GetDlgItem(IDC_COMMIT_AMENDDIFF)->EnableWindow(FALSE); + } + this->m_ctrlShowPatch.SetURL(CString()); return FALSE; // return TRUE unless you set the focus to a control -- 2.11.4.GIT