Commit e992b1a0 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Git: Do not pass --author on commit when author is unchanged

Change-Id: Ic77961ad9e426353d662e0d61eebdaba6bc2cf4d
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent d9502470
......@@ -127,8 +127,12 @@ void GitSubmitEditorWidget::refreshLog(const QString &repository)
GitSubmitEditorPanelData GitSubmitEditorWidget::panelData() const
{
GitSubmitEditorPanelData rc;
rc.author = m_gitSubmitPanelUi.authorLineEdit->text();
rc.email = m_gitSubmitPanelUi.emailLineEdit->text();
const QString author = m_gitSubmitPanelUi.authorLineEdit->text();
const QString email = m_gitSubmitPanelUi.emailLineEdit->text();
if (author != m_originalAuthor || email != m_originalEmail) {
rc.author = author;
rc.email = email;
}
rc.bypassHooks = m_gitSubmitPanelUi.bypassHooksCheckBox->isChecked();
rc.pushAction = m_pushAction;
return rc;
......@@ -136,6 +140,8 @@ GitSubmitEditorPanelData GitSubmitEditorWidget::panelData() const
void GitSubmitEditorWidget::setPanelData(const GitSubmitEditorPanelData &data)
{
m_originalAuthor = data.author;
m_originalEmail = data.email;
m_gitSubmitPanelUi.authorLineEdit->setText(data.author);
m_gitSubmitPanelUi.emailLineEdit->setText(data.email);
m_gitSubmitPanelUi.bypassHooksCheckBox->setChecked(data.bypassHooks);
......
......@@ -100,6 +100,8 @@ private:
LogChangeWidget *m_logChangeWidget;
Ui::GitSubmitPanel m_gitSubmitPanelUi;
QValidator *m_emailValidator;
QString m_originalAuthor;
QString m_originalEmail;
bool m_hasUnmerged;
bool m_isInitialized;
};
......
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