Git: Enable push also for detached HEAD

Task-number: QTCREATORBUG-24508
Change-Id: I326b701c79b21f2d4495d752c7928fadd80901d9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2020-09-28 21:32:36 +03:00
committed by Orgad Shaneh
parent 103b35bcd5
commit 52d1b31a67

View File

@@ -262,10 +262,12 @@ void BranchView::slotCustomContextMenu(const QPoint &point)
contextMenu.addSeparator();
contextMenu.addAction(tr("Cherry &Pick"), this, &BranchView::cherryPick);
}
if (currentLocal && !currentSelected && !isTag) {
contextMenu.addAction(tr("&Track"), this, [this] {
m_model->setRemoteTracking(selectedIndex());
});
if (!currentSelected && !isTag) {
if (currentLocal) {
contextMenu.addAction(tr("&Track"), this, [this] {
m_model->setRemoteTracking(selectedIndex());
});
}
if (!isLocal) {
contextMenu.addSeparator();
contextMenu.addAction(tr("&Push"), this, &BranchView::push);