diff options
Diffstat (limited to 'src/plugins/git/gitplugin.cpp')
| -rw-r--r-- | src/plugins/git/gitplugin.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 22498c69d0..5796743901 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -1001,12 +1001,11 @@ void GitPlugin::pull() bool rebase = m_gitClient->settings()->boolValue(GitSettings::pullRebaseKey); if (!rebase) { - bool isDetached; - QString branchRebaseConfig = m_gitClient->synchronousRepositoryBranches(topLevel, &isDetached).at(0); - if (!isDetached) { - branchRebaseConfig.prepend(QLatin1String("branch.")); - branchRebaseConfig.append(QLatin1String(".rebase")); - rebase = (m_gitClient->readConfigValue(topLevel, branchRebaseConfig) == QLatin1String("true")); + QString currentBranch = m_gitClient->synchronousCurrentLocalBranch(topLevel); + if (!currentBranch.isEmpty()) { + currentBranch.prepend(QLatin1String("branch.")); + currentBranch.append(QLatin1String(".rebase")); + rebase = (m_gitClient->readConfigValue(topLevel, currentBranch) == QLatin1String("true")); } } |
