Git: Remove "Branch" from synchronousCheckoutBranch

Other refs can also be checked out using this function

Change-Id: I80a1c15244b1043cfce650a121c71174b9d322cb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Orgad Shaneh
2013-01-24 11:32:45 +02:00
committed by Orgad Shaneh
parent a85c32cb4a
commit cf5f109b68
4 changed files with 8 additions and 8 deletions

View File

@@ -778,21 +778,21 @@ void GitClient::blame(const QString &workingDirectory,
executeGit(workingDirectory, arguments, editor, false, VcsBase::Command::NoReport, lineNumber);
}
bool GitClient::synchronousCheckoutBranch(const QString &workingDirectory,
const QString &branch,
bool GitClient::synchronousCheckout(const QString &workingDirectory,
const QString &ref,
QString *errorMessage /* = 0 */)
{
QByteArray outputText;
QByteArray errorText;
QStringList arguments;
arguments << QLatin1String("checkout") << branch;
arguments << QLatin1String("checkout") << ref;
const bool rc = fullySynchronousGit(workingDirectory, arguments, &outputText, &errorText);
const QString output = commandOutputFromLocal8Bit(outputText);
outputWindow()->append(output);
if (!rc) {
const QString stdErr = commandOutputFromLocal8Bit(errorText);
//: Meaning of the arguments: %1: Branch, %2: Repository, %3: Error message
const QString msg = tr("Cannot checkout \"%1\" of \"%2\": %3").arg(branch, workingDirectory, stdErr);
const QString msg = tr("Cannot checkout \"%1\" of \"%2\": %3").arg(ref, workingDirectory, stdErr);
if (errorMessage)
*errorMessage = msg;
else