X-Git-Url: http://git.sourceforge.jp/view?p=tortoisegit%2FTortoiseGitJp.git;a=blobdiff_plain;f=src%2FTortoiseProc%2FGitLogListBase.cpp;h=da2078ba3abe7d8fa99c2630c6325a2b915ffc3e;hp=3bc63a36be145fb40b1f147931503a9b1d3d23f4;hb=2b3b98037d04164eb697b0319fd7a1c636812b58;hpb=4dd8f3d2af6c75b9ccc818022a415d021e145ed6 diff --git a/src/TortoiseProc/GitLogListBase.cpp b/src/TortoiseProc/GitLogListBase.cpp index 3bc63a3..da2078b 100644 --- a/src/TortoiseProc/GitLogListBase.cpp +++ b/src/TortoiseProc/GitLogListBase.cpp @@ -1133,6 +1133,7 @@ void CGitLogListBase::OnContextMenu(CWnd* pWnd, CPoint point) if(m_ContextMenuMask&GetContextMenuBit(ID_COMPARETWO)) popup.AppendMenuIcon(ID_COMPARETWO, IDS_LOG_POPUP_COMPARETWO, IDI_DIFF); } + if (GetSelectedCount() == 2) { //popup.AppendMenuIcon(ID_BLAMETWO, IDS_LOG_POPUP_BLAMEREVS, IDI_BLAME); @@ -1140,6 +1141,20 @@ void CGitLogListBase::OnContextMenu(CWnd* pWnd, CPoint point) popup.AppendMenuIcon(ID_GNUDIFF2, IDS_LOG_POPUP_GNUDIFF, IDI_DIFF); bAddSeparator = true; } + + if ( IsSelectionContinuous() ) + { + if(m_ContextMenuMask&GetContextMenuBit(ID_COMBINE_COMMIT)) + { + CString head; + head.Format(_T("HEAD~%d"),LastSelect); + CString hash=g_Git.GetHash(head); + hash=hash.Left(40); + GitRev* pLastEntry = reinterpret_cast(m_arShownList.GetAt(LastSelect)); + if(pLastEntry->m_CommitHash == hash) + popup.AppendMenuIcon(ID_COMBINE_COMMIT,_T("Combine to one commit"),IDI_MERGE); + } + } if (m_hasWC) { //popup.AppendMenuIcon(ID_REVERTREV, IDS_LOG_POPUP_REVERTREVS, IDI_REVERT);