Git: Show tracking branch on Branches dialog

Simplify branch model parsing a bit

Change-Id: Id9e41c6c2769397d6eee3ab74de4afbb94111e25
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
This commit is contained in:
Orgad Shaneh
2013-06-13 23:17:37 +03:00
committed by Orgad Shaneh
parent 7d300a29bf
commit e9443ff51f
4 changed files with 24 additions and 29 deletions

View File

@@ -1883,16 +1883,17 @@ bool GitClient::synchronousBranchCmd(const QString &workingDirectory, QStringLis
return true;
}
bool GitClient::synchronousShowRefCmd(const QString &workingDirectory, QStringList args,
bool GitClient::synchronousForEachRefCmd(const QString &workingDirectory, QStringList args,
QString *output, QString *errorMessage)
{
args.push_front(QLatin1String("show-ref"));
args.push_front(QLatin1String("for-each-ref"));
QByteArray outputText;
QByteArray errorText;
const bool rc = fullySynchronousGit(workingDirectory, args, &outputText, &errorText);
*output = commandOutputFromLocal8Bit(outputText);
if (!rc) {
*errorMessage = msgCannotRun(QLatin1String("git show-ref"), workingDirectory, commandOutputFromLocal8Bit(errorText));
*errorMessage = msgCannotRun(QLatin1String("git for-each-ref"), workingDirectory,
commandOutputFromLocal8Bit(errorText));
return false;
}