forked from qt-creator/qt-creator
Git: Fixed a bug with rebase check
Rebase on pull should check if branch configuration has rebase set to true. This is important to correctly abort operation when conflicts appear, and user chooses not to run mergetool Change-Id: I365aa534bdbece466514f542ea2e3c371c89a4a8 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
25f05f7c9e
commit
4009c305fb
@@ -888,7 +888,17 @@ void GitPlugin::pull()
|
||||
{
|
||||
const VcsBase::VcsBasePluginState state = currentState();
|
||||
QTC_ASSERT(state.hasTopLevel(), return);
|
||||
const bool rebase = m_gitClient->settings()->boolValue(GitSettings::pullRebaseKey);
|
||||
bool rebase = m_gitClient->settings()->boolValue(GitSettings::pullRebaseKey);
|
||||
|
||||
if (!rebase) {
|
||||
bool isDetached;
|
||||
QString branchRebaseConfig = m_gitClient->synchronousRepositoryBranches(state.topLevel(), &isDetached).at(0);
|
||||
if (!isDetached) {
|
||||
branchRebaseConfig.prepend(QLatin1String("branch."));
|
||||
branchRebaseConfig.append(QLatin1String(".rebase"));
|
||||
rebase = (m_gitClient->readConfigValue(state.topLevel(), branchRebaseConfig) == QLatin1String("true"));
|
||||
}
|
||||
}
|
||||
|
||||
GitClient::StashResult stashResult = m_gitClient->ensureStash(state.topLevel());
|
||||
switch (stashResult) {
|
||||
|
Reference in New Issue
Block a user