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

Git: Do not return empty string for top commit in LogChangeDialog



Change-Id: I26cff005974102c037bbbff04b7606e7f8a07b84
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 9228587b
......@@ -769,11 +769,8 @@ void GitPlugin::startRebase()
return;
LogChangeDialog dialog(false);
dialog.setWindowTitle(tr("Interactive Rebase"));
if (!dialog.runDialog(workingDirectory, QString(), false))
return;
const QString change = dialog.commit();
if (!change.isEmpty())
m_gitClient->interactiveRebase(workingDirectory, change, *stashGuard.take(), false);
if (dialog.runDialog(workingDirectory, QString(), false))
m_gitClient->interactiveRebase(workingDirectory, dialog.commit(), *stashGuard.take(), false);
}
void GitPlugin::startChangeRelatedAction()
......
......@@ -76,9 +76,8 @@ bool LogChangeWidget::init(const QString &repository, const QString &commit, boo
QString LogChangeWidget::commit() const
{
// Return Sha1, or empty for top commit.
if (const QStandardItem *sha1Item = currentItem(Sha1Column))
return sha1Item->row() ? sha1Item->text() : QString();
return sha1Item->text();
return QString();
}
......
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