Merge "upstream cleanup 17"
This commit is contained in:
@@ -2,6 +2,14 @@
|
|||||||
Commit messages
|
Commit messages
|
||||||
===============
|
===============
|
||||||
|
|
||||||
|
.. rst-class:: colright
|
||||||
|
|
||||||
|
| <teacher name>
|
||||||
|
| <date>
|
||||||
|
|
||||||
|
Commit messages
|
||||||
|
===============
|
||||||
|
|
||||||
- quality of the OpenStack git history
|
- quality of the OpenStack git history
|
||||||
- carrot by alerting people to the benefits
|
- carrot by alerting people to the benefits
|
||||||
- anyone doing Gerrit code review can act as the stick
|
- anyone doing Gerrit code review can act as the stick
|
||||||
@@ -9,8 +17,6 @@ Commit messages
|
|||||||
- Developers read mostly, write occasionally
|
- Developers read mostly, write occasionally
|
||||||
- https://wiki.openstack.org/wiki/GitCommitMessages
|
- https://wiki.openstack.org/wiki/GitCommitMessages
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Structural split of changes
|
Structural split of changes
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
@@ -19,8 +25,6 @@ Structural split of changes
|
|||||||
- Easier to bisect
|
- Easier to bisect
|
||||||
- Easier to browse
|
- Easier to browse
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Things to avoid
|
Things to avoid
|
||||||
===============
|
===============
|
||||||
|
|
||||||
@@ -28,29 +32,21 @@ Things to avoid
|
|||||||
- Mixing two unrelated functional changes.
|
- Mixing two unrelated functional changes.
|
||||||
- Sending large new features in a single giant commit.
|
- Sending large new features in a single giant commit.
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Bad: two independent changes
|
Bad: two independent changes
|
||||||
=============================
|
=============================
|
||||||
|
|
||||||
.. image:: ./_assets/17-01-bad-two.png
|
.. image:: ./_assets/17-01-bad-two.png
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Bad: new feature and refactor
|
Bad: new feature and refactor
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
.. image:: ./_assets/17-02-bad-new.png
|
.. image:: ./_assets/17-02-bad-new.png
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Good: new API + new feature
|
Good: new API + new feature
|
||||||
============================
|
============================
|
||||||
|
|
||||||
.. image:: ./_assets/17-03-good.png
|
.. image:: ./_assets/17-03-good.png
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Do not assume ...
|
Do not assume ...
|
||||||
=================
|
=================
|
||||||
|
|
||||||
@@ -58,8 +54,6 @@ Do not assume ...
|
|||||||
- the reviewer has access to external web services/site.
|
- the reviewer has access to external web services/site.
|
||||||
- the code is self-evident/self-documenting.
|
- the code is self-evident/self-documenting.
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Information in commit messages (1/2)
|
Information in commit messages (1/2)
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
@@ -67,8 +61,6 @@ Information in commit messages (1/2)
|
|||||||
- Read the commit message to see if it hints at improved code structure.
|
- Read the commit message to see if it hints at improved code structure.
|
||||||
- Ensure sufficient information to decide whether to review.
|
- Ensure sufficient information to decide whether to review.
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Information in commit messages (2/2)
|
Information in commit messages (2/2)
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
@@ -76,8 +68,6 @@ Information in commit messages (2/2)
|
|||||||
- Do not include patch set-specific comments.
|
- Do not include patch set-specific comments.
|
||||||
- The first commit line is the most important.
|
- The first commit line is the most important.
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Required external references
|
Required external references
|
||||||
============================
|
============================
|
||||||
|
|
||||||
@@ -85,8 +75,6 @@ Required external references
|
|||||||
- Bug
|
- Bug
|
||||||
- blueprint
|
- blueprint
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Optional external references
|
Optional external references
|
||||||
============================
|
============================
|
||||||
|
|
||||||
@@ -94,17 +82,12 @@ Optional external references
|
|||||||
- SecurityImpact
|
- SecurityImpact
|
||||||
- UpgradeImpact
|
- UpgradeImpact
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
GIT commit message structure
|
GIT commit message structure
|
||||||
============================
|
============================
|
||||||
|
|
||||||
.. image:: ./_assets/17-04-commit-message.png
|
.. image:: ./_assets/17-04-commit-message.png
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
Exercise
|
Exercise
|
||||||
========
|
========
|
||||||
|
|
||||||
Review each other’s commit messages on the draft
|
Review each other’s commit messages on the draft
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user