[dpdk-dev] doc: add author on cc to git fixline alias

Message ID 1499866732-17085-1-git-send-email-harry.van.haaren@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Van Haaren, Harry July 12, 2017, 1:38 p.m. UTC
  With this commit, the correct method to use git fixline to indicate
a fix of a previous commit has changed. The new rules require the
author of the original code that is being fixed to be on CC.

The logic behind this improvement is that if there is a genuine bug,
one of the ideal people to review is the author of the original code
being fixed. Adding them on Cc makes them aware of the patch, avoiding
it from being passed by accidentally while reading the mailing-list.

Given that the original author (now on Cc:) might not actually review,
there is no value in keeping the Cc: in git commit history. If the
original author performs a review, their Reviewed-by: or Acked-by: is
stored in git history (same as now).

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>

---

This fixline suggestion was proposed here:
http://dpdk.org/ml/archives/dev/2017-July/071107.html

Based on Thomas' feedback, improved CC: to Cc, and added note about
removing the Cc: from git history.
http://dpdk.org/ml/archives/dev/2017-July/071119.html

---
 doc/guides/contributing/patches.rst | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
  

Comments

Adrien Mazarguil July 24, 2017, 3:07 p.m. UTC | #1
On Wed, Jul 12, 2017 at 02:38:52PM +0100, Harry van Haaren wrote:
> With this commit, the correct method to use git fixline to indicate
> a fix of a previous commit has changed. The new rules require the
> author of the original code that is being fixed to be on CC.
> 
> The logic behind this improvement is that if there is a genuine bug,
> one of the ideal people to review is the author of the original code
> being fixed. Adding them on Cc makes them aware of the patch, avoiding
> it from being passed by accidentally while reading the mailing-list.
> 
> Given that the original author (now on Cc:) might not actually review,
> there is no value in keeping the Cc: in git commit history. If the
> original author performs a review, their Reviewed-by: or Acked-by: is
> stored in git history (same as now).
> 
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
  
John McNamara Aug. 3, 2017, 10:55 a.m. UTC | #2
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Harry van Haaren
> Sent: Wednesday, July 12, 2017 2:39 PM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; Van Haaren, Harry <harry.van.haaren@intel.com>
> Subject: [dpdk-dev] [PATCH] doc: add author on cc to git fixline alias
> 
> With this commit, the correct method to use git fixline to indicate a fix
> of a previous commit has changed. The new rules require the author of the
> original code that is being fixed to be on CC.
> 
> The logic behind this improvement is that if there is a genuine bug, one
> of the ideal people to review is the author of the original code being
> fixed. Adding them on Cc makes them aware of the patch, avoiding it from
> being passed by accidentally while reading the mailing-list.
> 
> Given that the original author (now on Cc:) might not actually review,
> there is no value in keeping the Cc: in git commit history. If the
> original author performs a review, their Reviewed-by: or Acked-by: is
> stored in git history (same as now).
> 
> Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>

Acked-by: John McNamara <john.mcnamara@intel.com>
  
Thomas Monjalon Aug. 3, 2017, 1:29 p.m. UTC | #3
> > With this commit, the correct method to use git fixline to indicate a fix
> > of a previous commit has changed. The new rules require the author of the
> > original code that is being fixed to be on CC.
> > 
> > The logic behind this improvement is that if there is a genuine bug, one
> > of the ideal people to review is the author of the original code being
> > fixed. Adding them on Cc makes them aware of the patch, avoiding it from
> > being passed by accidentally while reading the mailing-list.
> > 
> > Given that the original author (now on Cc:) might not actually review,
> > there is no value in keeping the Cc: in git commit history. If the
> > original author performs a review, their Reviewed-by: or Acked-by: is
> > stored in git history (same as now).
> > 
> > Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Acked-by: Thomas Monjalon <thomas@monjalon.net>

Applied, thanks

Please update also the alias on the website.
  

Patch

diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
index 7926c96..27e218b 100644
--- a/doc/guides/contributing/patches.rst
+++ b/doc/guides/contributing/patches.rst
@@ -207,18 +207,21 @@  Here are some guidelines for the body of a commit message:
 
 * The text of the commit message should be wrapped at 72 characters.
 
-* When fixing a regression, it is a good idea to reference the id of the commit which introduced the bug.
-  You can generate the required text using the following git alias::
+* When fixing a regression, it is required to reference the id of the commit
+  which introduced the bug, and put the original author of that commit on CC.
+  You can generate the required lines using the following git alias, which prints
+  the commit SHA and the author of the original code::
 
-     git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h (\"%s\")'"
+     git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae'"
 
-  The ``Fixes:`` line can then be added to the commit message::
+  The output of ``git fixline <SHA>`` must then be added to the commit message::
 
-     doc: fix vhost sample parameter
+     doc: fix some parameter description
 
-     Update the docs to reflect removed dev-index.
+     Update the docs, fixing description of some parameter.
 
-     Fixes: 17b8320a3e11 ("vhost: remove index parameter")
+     Fixes: abcdefgh1234 ("doc: add some parameter")
+     Cc: author@example.com
 
      Signed-off-by: Alex Smith <alex.smith@example.com>