From b3cf553e1a66d6094b9c1a4a3221f0422faf53f8 Mon Sep 17 00:00:00 2001 From: Andre Hartmann Date: Sun, 16 Feb 2020 15:20:06 +0100 Subject: [PATCH] Git: Ignore unknown push failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Miklós Márton --- src/plugins/git/gitclient.cpp | 2 ++ src/plugins/git/gitclient.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index 3a7c0f98a30..9671fea70d4 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -3108,6 +3108,8 @@ void GitClient::push(const QString &workingDirectory, const QStringList &pushArg this, [this, command, workingDirectory, pushArgs](bool success) { if (!success) { switch (static_cast(command->cookie().toInt())) { + case Unknown: + break; case NonFastForward: { const QColor warnColor = Utils::creatorTheme()->color(Theme::TextColorError); if (QMessageBox::question( diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index d923ec0fe6a..f605bca767d 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -80,6 +80,7 @@ enum StashFlag { }; enum PushFailure { + Unknown, NonFastForward, NoRemoteBranch };