diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index aa4e2b48db3..87fb48d6f3c 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -3047,12 +3047,9 @@ bool GitClient::getCommitData(const QString &workingDirectory, commitData.enablePush = !synchronousRemotesList(repoDirectory).isEmpty(); if (commitData.enablePush) { - switch (checkCommandInProgress(repoDirectory)) { - case GitClient::Rebase: - case GitClient::RebaseMerge: + CommandInProgress commandInProgress = checkCommandInProgress(repoDirectory); + if (commandInProgress == Rebase || commandInProgress == RebaseMerge) commitData.enablePush = false; - break; - } } return true;