Add slide #17 of upstream training
Change-Id: I31020193f0aa2fb95974c0ab8d2ec88a554bfe48
This commit is contained in:
parent
8ddb22c56d
commit
7ae0da7924
108
doc/upstream-training/17-commit-message.rst
Normal file
108
doc/upstream-training/17-commit-message.rst
Normal file
@ -0,0 +1,108 @@
|
||||
Commit messages
|
||||
===============
|
||||
|
||||
- quality of the OpenStack GIT history
|
||||
- carrot by alerting people to the benefits
|
||||
- anyone doing Gerrit code review can act as the stick
|
||||
- review the commit message, not just code
|
||||
- Developers read mostly, write occassionally
|
||||
|
||||
----
|
||||
|
||||
Structural split of changes
|
||||
===========================
|
||||
|
||||
- Small means quicker & easier
|
||||
- Easier to revert
|
||||
- Easier to bisect
|
||||
- Easier to browse
|
||||
|
||||
----
|
||||
|
||||
Things to avoid
|
||||
===============
|
||||
|
||||
- Mixing whitespace changes with functional code changes.
|
||||
- Mixing two unrelated functional changes.
|
||||
- Sending large new features in a single giant commit.
|
||||
|
||||
----
|
||||
|
||||
Bad : two independent changes
|
||||
=============================
|
||||
|
||||
.. image:: ./_assets/17-01-bad-two.png
|
||||
|
||||
----
|
||||
|
||||
Bad : new feature and refactor
|
||||
==============================
|
||||
|
||||
.. image:: ./_assets/17-02-bad-new.png
|
||||
|
||||
----
|
||||
|
||||
Good : new API + new feature
|
||||
============================
|
||||
|
||||
.. image:: ./_assets/17-03-good.png
|
||||
|
||||
----
|
||||
|
||||
Do not assume ...
|
||||
=================
|
||||
|
||||
- the reviewer understands what the original problem was.
|
||||
- the reviewer has access to external web services/site.
|
||||
- the code is self-evident/self-documenting.
|
||||
|
||||
----
|
||||
|
||||
Information in commit messages (1/2)
|
||||
====================================
|
||||
|
||||
- Describe why a change is being made
|
||||
- Read the commit message to see if it hints at improved code structure.
|
||||
- Ensure sufficient information to decide whether to review.
|
||||
|
||||
----
|
||||
|
||||
Information in commit messages (2/2)
|
||||
====================================
|
||||
|
||||
- Describe any limitations of the current code.
|
||||
- Do not include patch set-specific comments.
|
||||
- The first commit line is the most important.
|
||||
|
||||
----
|
||||
|
||||
Required external references
|
||||
============================
|
||||
|
||||
- Change-id
|
||||
- Bug
|
||||
- blueprint
|
||||
|
||||
----
|
||||
|
||||
Optional external references
|
||||
============================
|
||||
|
||||
- DocImpact
|
||||
- SecurityImpact
|
||||
- UpgradeImpact
|
||||
|
||||
----
|
||||
|
||||
GIT commit message structure
|
||||
============================
|
||||
|
||||
.. image:: ./_assets/17-04-commit-message.png
|
||||
|
||||
----
|
||||
|
||||
Exercise
|
||||
========
|
||||
|
||||
review each other messages on the draft
|
||||
|
BIN
doc/upstream-training/_assets/17-01-bad-two.png
Normal file
BIN
doc/upstream-training/_assets/17-01-bad-two.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
doc/upstream-training/_assets/17-02-bad-new.png
Normal file
BIN
doc/upstream-training/_assets/17-02-bad-new.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
BIN
doc/upstream-training/_assets/17-03-good.png
Normal file
BIN
doc/upstream-training/_assets/17-03-good.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
BIN
doc/upstream-training/_assets/17-04-commit-message.png
Normal file
BIN
doc/upstream-training/_assets/17-04-commit-message.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
Loading…
x
Reference in New Issue
Block a user