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,13 +152,17 @@ void BranchDialog::add() ...@@ -152,13 +152,17 @@ 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) {
QString suggestedNameBase;
suggestedNameBase = trackedBranch.mid(trackedBranch.lastIndexOf(QLatin1Char('/')) + 1);
suggestedName = suggestedNameBase;
int i = 2; int i = 2;
while (localNames.contains(suggestedName)) { while (localNames.contains(suggestedName)) {
suggestedName = suggestedNameBase + QString::number(i); suggestedName = suggestedNameBase + QString::number(i);
++i; ++i;
} }
}
BranchAddDialog branchAddDialog(localNames, true, this); BranchAddDialog branchAddDialog(localNames, true, this);
branchAddDialog.setBranchName(suggestedName); branchAddDialog.setBranchName(suggestedName);
......
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