Commit 6a87d8d3 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Cancel adding a branch if the git operation fails

e.g. If a branch with the chosen name already exists

Change-Id: I22be3001ed68d6bf6f45d9180ad60403267d4ad9
Reviewed-by: default avatarPetar Perisin <>
parent 3533ad2b
......@@ -160,6 +160,8 @@ void BranchDialog::add()
if (branchAddDialog.exec() == QDialog::Accepted && m_model) {
QModelIndex idx = m_model->addBranch(branchAddDialog.branchName(), branchAddDialog.track(), trackedIndex);
if (!idx.isValid())
m_ui->branchView->selectionModel()->select(idx, QItemSelectionModel::Clear
| QItemSelectionModel::Select
| QItemSelectionModel::Current);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment