Git: Prevent tracking tags

Change-Id: Iea935aa226b70de936653b7637b4b9bb5e9c64cf
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-06-19 06:12:08 +03:00
committed by Orgad Shaneh
parent 11e7c706be
commit 57a6f04ce6
4 changed files with 27 additions and 4 deletions

View File

@@ -128,6 +128,7 @@ void BranchDialog::add()
trackedBranch = m_model->branchName(trackedIndex);
}
const bool isLocal = m_model->isLocal(trackedIndex);
const bool isTag = m_model->isTag(trackedIndex);
QStringList localNames = m_model->localBranchNames();
@@ -141,7 +142,7 @@ void BranchDialog::add()
BranchAddDialog branchAddDialog(true, this);
branchAddDialog.setBranchName(suggestedName);
branchAddDialog.setTrackedBranchName(trackedBranch, !isLocal);
branchAddDialog.setTrackedBranchName(isTag ? QString() : trackedBranch, !isLocal);
if (branchAddDialog.exec() == QDialog::Accepted && m_model) {
QModelIndex idx = m_model->addBranch(branchAddDialog.branchName(), branchAddDialog.track(), trackedIndex);