Git: Ignore unknown push failures

Pushing to Gerrit can fail with due to missing
Change-Id. In that case, none of the existing
warnings should appear.

Change-Id: I4bf55d35a792b680e3ae524e116ce5db9fdd405a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com>
This commit is contained in:
Andre Hartmann
2020-02-16 15:20:06 +01:00
committed by André Hartmann
parent 673f50cae5
commit b3cf553e1a
2 changed files with 3 additions and 0 deletions

View File

@@ -3108,6 +3108,8 @@ void GitClient::push(const QString &workingDirectory, const QStringList &pushArg
this, [this, command, workingDirectory, pushArgs](bool success) { this, [this, command, workingDirectory, pushArgs](bool success) {
if (!success) { if (!success) {
switch (static_cast<PushFailure>(command->cookie().toInt())) { switch (static_cast<PushFailure>(command->cookie().toInt())) {
case Unknown:
break;
case NonFastForward: { case NonFastForward: {
const QColor warnColor = Utils::creatorTheme()->color(Theme::TextColorError); const QColor warnColor = Utils::creatorTheme()->color(Theme::TextColorError);
if (QMessageBox::question( if (QMessageBox::question(

View File

@@ -80,6 +80,7 @@ enum StashFlag {
}; };
enum PushFailure { enum PushFailure {
Unknown,
NonFastForward, NonFastForward,
NoRemoteBranch NoRemoteBranch
}; };