forked from qt-creator/qt-creator
Git: Support reflog also for branches
Change-Id: I9321ba4964d086d90aaf540a2006f95b94de8375 Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
c9f1d84db7
commit
c728d04b52
@@ -240,6 +240,7 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
|
||||
GitPlugin::client()->diffBranch(m_repository, fullName);
|
||||
});
|
||||
contextMenu.addAction(tr("&Log"), this, [this] { log(selectedIndex()); });
|
||||
contextMenu.addAction(tr("&Reflog"), this, [this] { reflog(selectedIndex()); });
|
||||
contextMenu.addSeparator();
|
||||
if (!currentSelected) {
|
||||
auto resetMenu = new QMenu(tr("Re&set"), &contextMenu);
|
||||
@@ -559,6 +560,13 @@ void BranchView::log(const QModelIndex &idx)
|
||||
GitPlugin::client()->log(m_repository, QString(), false, {branchName});
|
||||
}
|
||||
|
||||
void BranchView::reflog(const QModelIndex &idx)
|
||||
{
|
||||
const QString branchName = m_model->fullName(idx, true);
|
||||
if (!branchName.isEmpty())
|
||||
GitPlugin::client()->reflog(m_repository, branchName);
|
||||
}
|
||||
|
||||
void BranchView::push()
|
||||
{
|
||||
const QModelIndex selected = selectedIndex();
|
||||
|
||||
Reference in New Issue
Block a user