Commit aeab5d9a authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Git: Trim change on ChangeSelectionDialog

When a ref is copied from an external source (e.g. gerrit), it might
includes a trailing whitespace.

Change-Id: I61305af27959f457795afa37654e683622d38259
Reviewed-by: default avatarPetar Perisin <>
parent 746da715
......@@ -88,7 +88,7 @@ ChangeSelectionDialog::~ChangeSelectionDialog()
QString ChangeSelectionDialog::change() const
return m_ui->changeNumberEdit->text();
return m_ui->changeNumberEdit->text().trimmed();
void ChangeSelectionDialog::selectCommitFromRecentHistory()
......@@ -210,14 +210,14 @@ void ChangeSelectionDialog::recalculateDetails()
const QString change = m_ui->changeNumberEdit->text();
if (change.isEmpty()) {
const QString ref = change();
if (ref.isEmpty()) {
QStringList args;
args << QLatin1String("log") << QLatin1String("-n1") << change;
args << QLatin1String("log") << QLatin1String("-n1") << ref;
m_process = new QProcess(this);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment