Commit 42bbae26 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Do not suggest tag name for local branch



This causes unnecessary name ambiguity.

Change-Id: Id27060edb19b4902f2a93da042eb8389754b8e04
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent 117436a6
...@@ -152,12 +152,16 @@ void BranchDialog::add() ...@@ -152,12 +152,16 @@ void BranchDialog::add()
QStringList localNames = m_model->localBranchNames(); QStringList localNames = m_model->localBranchNames();
QString suggestedNameBase = trackedBranch.mid(trackedBranch.lastIndexOf(QLatin1Char('/')) + 1); QString suggestedName;
QString suggestedName = suggestedNameBase; if (!isTag) {
int i = 2; QString suggestedNameBase;
while (localNames.contains(suggestedName)) { suggestedNameBase = trackedBranch.mid(trackedBranch.lastIndexOf(QLatin1Char('/')) + 1);
suggestedName = suggestedNameBase + QString::number(i); suggestedName = suggestedNameBase;
++i; int i = 2;
while (localNames.contains(suggestedName)) {
suggestedName = suggestedNameBase + QString::number(i);
++i;
}
} }
BranchAddDialog branchAddDialog(localNames, true, this); BranchAddDialog branchAddDialog(localNames, true, this);
......
Markdown is supported
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