diff options
author | Petar Perisin <petar.perisin@gmail.com> | 2014-01-15 20:38:44 +0100 |
---|---|---|
committer | Petar Perisin <petar.perisin@gmail.com> | 2014-01-16 00:52:54 +0100 |
commit | 3a3dbb374627ce963053d086aaef9dc1339106e2 (patch) | |
tree | a3498572526bd6991c7d3bc3f90a44113106d9f3 /src | |
parent | fb3d65a872cd6679a368815c76d09e2e09664980 (diff) |
Git: Fixed bug with branches missing from a list
Change-Id: Id4fa9f6c4f874c9b1ac5112efceaf0c22ed84d00
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/git/gitclient.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 614761e166..aff5a3e853 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -2777,6 +2777,7 @@ QStringList GitClient::synchronousRepositoryBranches(const QString &repositoryUR branches << tr("<Detached HEAD>"); QString headSha; // split "82bfad2f51d34e98b18982211c82220b8db049b<tab>refs/heads/master" + bool headFound = false; foreach (const QString &line, resp.stdOut.split(QLatin1Char('\n'))) { if (line.endsWith(QLatin1String("\tHEAD"))) { QTC_CHECK(headSha.isNull()); @@ -2786,7 +2787,6 @@ QStringList GitClient::synchronousRepositoryBranches(const QString &repositoryUR const QString pattern = QLatin1String("\trefs/heads/"); const int pos = line.lastIndexOf(pattern); - bool headFound = false; if (pos != -1) { const QString branchName = line.mid(pos + pattern.count()); if (!headFound && line.startsWith(headSha)) { |