[1/1] doc: add author name on cc to git fixline alias

Message ID 20220612114007.23012-1-heinrich.schuchardt@canonical.com (mailing list archive)
State Rejected, archived
Delegated to: Thomas Monjalon
Headers
Series [1/1] doc: add author name on cc to git fixline alias |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Heinrich Schuchardt June 12, 2022, 11:40 a.m. UTC
  We should add both the author name and the author email address to
the Cc: line of a blamed patch.

Fixes: f9ef083c6cfe ("doc: add author on cc to git fixline alias")
Cc: Harry van Haaren <harry.van.haaren@intel.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
 doc/guides/contributing/patches.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit June 13, 2022, 7:47 a.m. UTC | #1
On 6/12/2022 12:40 PM, Heinrich Schuchardt wrote:
> We should add both the author name and the author email address to
> the Cc: line of a blamed patch.
> 
> Fixes: f9ef083c6cfe ("doc: add author on cc to git fixline alias")
> Cc: Harry van Haaren <harry.van.haaren@intel.com>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>   doc/guides/contributing/patches.rst | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
> index bebcaf3925..aad2429e58 100644
> --- a/doc/guides/contributing/patches.rst
> +++ b/doc/guides/contributing/patches.rst
> @@ -260,7 +260,7 @@ Here are some guidelines for the body of a commit message:
>     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\")%nCc: %ae'"
> +     git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %an <%ae>'"
>   

Hi Heinrich,

We don't keep the 'Cc: ' lines in commit lines when pushing to repo,
it is mainly added to be sure author of the original change is cc'ed 
since 'git send-email' picks emails from commit log.
So although it doesn't hurt, it is also not needed to have full name & 
email since it will be stripped explicitly.

Thanks,
ferruh
  

Patch

diff --git a/doc/guides/contributing/patches.rst b/doc/guides/contributing/patches.rst
index bebcaf3925..aad2429e58 100644
--- a/doc/guides/contributing/patches.rst
+++ b/doc/guides/contributing/patches.rst
@@ -260,7 +260,7 @@  Here are some guidelines for the body of a commit message:
   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\")%nCc: %ae'"
+     git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %an <%ae>'"
 
   The output of ``git fixline <SHA>`` must then be added to the commit message::