forked from qt-creator/qt-creator
Git: Add Sign off feature in git commit view
Change-Id: Icb0a8818f707d6a874a9b97318fc6a93205b4ce9 Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
405c456d0d
commit
ac83af4ef0
@@ -44,6 +44,7 @@ void GitSubmitEditorPanelData::clear()
|
|||||||
email.clear();
|
email.clear();
|
||||||
bypassHooks = false;
|
bypassHooks = false;
|
||||||
pushAction = NoPush;
|
pushAction = NoPush;
|
||||||
|
signOff = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GitSubmitEditorPanelData::authorString() const
|
QString GitSubmitEditorPanelData::authorString() const
|
||||||
|
@@ -60,6 +60,7 @@ public:
|
|||||||
QString email;
|
QString email;
|
||||||
bool bypassHooks;
|
bool bypassHooks;
|
||||||
PushAction pushAction;
|
PushAction pushAction;
|
||||||
|
bool signOff;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FileState {
|
enum FileState {
|
||||||
|
@@ -2529,6 +2529,8 @@ bool GitClient::addAndCommit(const QString &repositoryDirectory,
|
|||||||
arguments << "--author" << authorString;
|
arguments << "--author" << authorString;
|
||||||
if (data.bypassHooks)
|
if (data.bypassHooks)
|
||||||
arguments << "--no-verify";
|
arguments << "--no-verify";
|
||||||
|
if (data.signOff)
|
||||||
|
arguments << "--signoff";
|
||||||
}
|
}
|
||||||
|
|
||||||
const SynchronousProcessResponse resp = vcsFullySynchronousExec(repositoryDirectory, arguments);
|
const SynchronousProcessResponse resp = vcsFullySynchronousExec(repositoryDirectory, arguments);
|
||||||
|
@@ -137,6 +137,7 @@ GitSubmitEditorPanelData GitSubmitEditorWidget::panelData() const
|
|||||||
}
|
}
|
||||||
rc.bypassHooks = m_gitSubmitPanelUi.bypassHooksCheckBox->isChecked();
|
rc.bypassHooks = m_gitSubmitPanelUi.bypassHooksCheckBox->isChecked();
|
||||||
rc.pushAction = m_pushAction;
|
rc.pushAction = m_pushAction;
|
||||||
|
rc.signOff = m_gitSubmitPanelUi.signOffCheckBox->isChecked();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,6 +148,7 @@ void GitSubmitEditorWidget::setPanelData(const GitSubmitEditorPanelData &data)
|
|||||||
m_gitSubmitPanelUi.authorLineEdit->setText(data.author);
|
m_gitSubmitPanelUi.authorLineEdit->setText(data.author);
|
||||||
m_gitSubmitPanelUi.emailLineEdit->setText(data.email);
|
m_gitSubmitPanelUi.emailLineEdit->setText(data.email);
|
||||||
m_gitSubmitPanelUi.bypassHooksCheckBox->setChecked(data.bypassHooks);
|
m_gitSubmitPanelUi.bypassHooksCheckBox->setChecked(data.bypassHooks);
|
||||||
|
m_gitSubmitPanelUi.signOffCheckBox->setChecked(data.signOff);
|
||||||
authorInformationChanged();
|
authorInformationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>364</width>
|
<width>364</width>
|
||||||
<height>198</height>
|
<height>269</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<widget class="QLineEdit" name="authorLineEdit">
|
<widget class="QLineEdit" name="authorLineEdit">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>150</width>
|
<width>200</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@@ -101,12 +101,9 @@
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>5</width>
|
<width>40</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@@ -123,13 +120,13 @@
|
|||||||
<widget class="QLineEdit" name="emailLineEdit">
|
<widget class="QLineEdit" name="emailLineEdit">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>150</width>
|
<width>200</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2" colspan="2">
|
||||||
<widget class="QLabel" name="invalidEmailLabel">
|
<widget class="QLabel" name="invalidEmailLabel">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -140,22 +137,36 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
<widget class="QCheckBox" name="bypassHooksCheckBox">
|
<widget class="QCheckBox" name="bypassHooksCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>By&pass hooks</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QCheckBox" name="signOffCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>By&pass hooks:</string>
|
<string>&Sign off</string>
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>bypassHooksCheckBox</cstring>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Reference in New Issue
Block a user