Git: Filter out commits according to active remote

... in the Push to Gerrit dialog.

Fixes: QTCREATORBUG-24436
Change-Id: I2f1ab49d9fbeb09ffb66de23d34a2facd53cb725
Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
Orgad Shaneh
2020-08-09 18:44:12 +03:00
committed by Orgad Shaneh
parent bafc8381c6
commit 354f628052
3 changed files with 17 additions and 2 deletions

View File

@@ -183,8 +183,12 @@ bool LogChangeWidget::populateLog(const QString &repository, const QString &comm
QStringList arguments;
arguments << "--max-count=1000" << "--format=%h:%s %d";
arguments << (commit.isEmpty() ? "HEAD" : commit);
if (!(flags & IncludeRemotes))
arguments << "--not" << "--remotes";
if (!(flags & IncludeRemotes)) {
QString remotesFlag("--remotes");
if (!m_excludedRemote.isEmpty())
remotesFlag += '=' + m_excludedRemote;
arguments << "--not" << remotesFlag;
}
arguments << "--";
QString output;
if (!GitClient::instance()->synchronousLog(