forked from qt-creator/qt-creator
Git: Enable --no-verify for commit
Change-Id: I88cfb7839b41467e3f6b25bea329eb15765e440e Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
63f0c0a62f
commit
6a3f9460d7
@@ -58,6 +58,7 @@ void GitSubmitEditorPanelData::clear()
|
||||
{
|
||||
author.clear();
|
||||
email.clear();
|
||||
bypassHooks = false;
|
||||
}
|
||||
|
||||
QString GitSubmitEditorPanelData::authorString() const
|
||||
@@ -76,7 +77,8 @@ QString GitSubmitEditorPanelData::authorString() const
|
||||
|
||||
QDebug operator<<(QDebug d, const GitSubmitEditorPanelData &data)
|
||||
{
|
||||
d.nospace() << " author:" << data.author << " email: " << data.email;
|
||||
d.nospace() << " author:" << data.author << " email: " << data.email
|
||||
<< " bypass hooks: " << data.bypassHooks;
|
||||
return d;
|
||||
}
|
||||
|
||||
|
@@ -62,6 +62,7 @@ struct GitSubmitEditorPanelData
|
||||
|
||||
QString author;
|
||||
QString email;
|
||||
bool bypassHooks;
|
||||
};
|
||||
|
||||
QDebug operator<<(QDebug d, const GitSubmitEditorPanelData &);
|
||||
|
@@ -1874,6 +1874,8 @@ bool GitClient::addAndCommit(const QString &repositoryDirectory,
|
||||
const QString &authorString = data.authorString();
|
||||
if (!authorString.isEmpty())
|
||||
args << QLatin1String("--author") << authorString;
|
||||
if (data.bypassHooks)
|
||||
args << QLatin1String("--no-verify");
|
||||
|
||||
QByteArray outputText;
|
||||
QByteArray errorText;
|
||||
|
@@ -143,6 +143,7 @@ GitSubmitEditorPanelData GitSubmitEditorWidget::panelData() const
|
||||
GitSubmitEditorPanelData rc;
|
||||
rc.author = m_gitSubmitPanelUi.authorLineEdit->text();
|
||||
rc.email = m_gitSubmitPanelUi.emailLineEdit->text();
|
||||
rc.bypassHooks = m_gitSubmitPanelUi.bypassHooksCheckBox->isChecked();
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -150,6 +151,7 @@ void GitSubmitEditorWidget::setPanelData(const GitSubmitEditorPanelData &data)
|
||||
{
|
||||
m_gitSubmitPanelUi.authorLineEdit->setText(data.author);
|
||||
m_gitSubmitPanelUi.emailLineEdit->setText(data.email);
|
||||
m_gitSubmitPanelUi.bypassHooksCheckBox->setChecked(data.bypassHooks);
|
||||
authorInformationChanged();
|
||||
}
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>364</width>
|
||||
<height>172</height>
|
||||
<height>177</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
@@ -60,23 +60,6 @@
|
||||
<string>Commit Information</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="authorLabel">
|
||||
<property name="text">
|
||||
<string>Author:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="authorLineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="invalidAuthorLabel">
|
||||
<property name="minimumSize">
|
||||
@@ -93,22 +76,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="emailLabel">
|
||||
<property name="text">
|
||||
@@ -142,6 +109,46 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="authorLabel">
|
||||
<property name="text">
|
||||
<string>Author:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="authorLineEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>5</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="bypassHooksCheckBox">
|
||||
<property name="text">
|
||||
<string>By&pass hooks</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
Reference in New Issue
Block a user