Git: Allow removing stale remote branches

... from the Branch View context menu on a
specific remote.

Change-Id: Ic7772abe32795a5d11bd4cae989f8d66cc4322e0
Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Andre Hartmann
2019-12-12 20:45:42 +01:00
committed by André Hartmann
parent 3dc511f1d1
commit 00e04d5022
3 changed files with 18 additions and 0 deletions

View File

@@ -212,6 +212,12 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
GitPlugin::client()->fetch(m_repository, *remote);
});
contextMenu.addSeparator();
if (!remote->isEmpty()) {
contextMenu.addAction(tr("Remove &Stale Branches"), this, [this, &remote]() {
GitPlugin::client()->removeStaleRemoteBranches(m_repository, *remote);
});
contextMenu.addSeparator();
}
contextMenu.addAction(tr("Manage &Remotes..."), GitPlugin::instance(),
&GitPlugin::manageRemotes);
}