Git: Do not fail on add branch when no tracking branch selected

Change-Id: Icf278e4969ca98a8081d6a12be08e61670c8dbaa
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Orgad Shaneh
2012-06-03 22:56:38 +03:00
committed by Tobias Hunger
parent 284ab01d2b
commit 0ef2f65b0e

View File

@@ -501,7 +501,9 @@ QModelIndex BranchModel::addBranch(const QString &branchName, bool track, const
QStringList args;
args << (track ? QLatin1String("--track") : QLatin1String("--no-track"));
args << branchName << startPoint;
args << branchName;
if (!startPoint.isEmpty())
args << startPoint;
if (!m_client->synchronousBranchCmd(m_workingDirectory, args, &output, &errorMessage)) {
VcsBase::VcsBaseOutputWindow::instance()->appendError(errorMessage);