doc: update git fixline alias with cc to stable
PATCH 1/1 doc: update git fixline alias with cc to stable
Update git fixline alias to add [email protected] to Cc
--- doc/guides/contributing/patches.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
doc/guides/contributing/patches.rst +1 -1
@@ -255,7 +255,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: %ae%nCc: [email protected]'" The output of ``git fixline <SHA>`` must then be added to the commit message::
Signature · 1 line
2.21.0
Quoted 12 lines · Reshma Pattan
Update git fixline alias to add [email protected] to Cc
Signed-off-by Reshma Pattan <[email protected]>--- doc/guides/contributing/patches.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)doc/guides/contributing/patches.rst +0
-0
doc/guides/contributing/patches.rst Here are some guidelines for the body of a commit message: · line 261
Quoted 8 lines
doc/guides/contributing/patches.rst +1
-1@@ -255,7 +255,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: %ae%nCc: [email protected]'" The output of ``git fixline <SHA>`` must then be added to the commit message::
While a good idea, we don't always want to CC stable for all fixes, as fixes for commits in the current release obviously don't need backports. I suggest the stable maintainers comment on whether receiving these additional patches would be a problem for them, or if their tooling is sufficiency advanced for them to ignore these without issue...
/Bruce
Quoted 19 lines · Bruce Richardson
Quoted 18 lines · Reshma Pattan
Update git fixline alias to add [email protected] to Cc
Signed-off-by Reshma Pattan <[email protected]>--- doc/guides/contributing/patches.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)doc/guides/contributing/patches.rst +1
-1@@ -255,7 +255,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: %ae%nCc: [email protected]'"
Quoted 9 lines
doc/guides/contributing/patches.rst Here are some guidelines for the body of a commit message: · line 261
Quoted 2 lines
doc/guides/contributing/patches.rst +0
-0The output of ``git fixline <SHA>`` must then be added to the commit message::While a good idea, we don't always want to CC stable for all fixes, as fixes for commits in the current release obviously don't need backports. I suggest the stable maintainers comment on whether receiving these additional patches would be a problem for them, or if their tooling is sufficiency advanced for them to ignore these without issue...
If it were just applied to every fix, the tooling would catch the cases where the offending commit is not in the stable tree. However, there are times when authors don't want patches backported. For example, if it was invasive and had no practical relevance in the older code, or it caused an ABI change etc.
'Cc: [email protected]' is an indication that the patch is a candidate for backporting. With a tag missing in error there can be follow up at backport time, with a tag added in error the patch would be backported and it could be a problem further down the line. Given that, I would like to keep the current meaning of the tag so authors can indicate their intentions.
thanks,
Kevin.
Quoted 2 lines
/Bruce
19/11/2019 12:22, Bruce Richardson:
Quoted 10 lines · Reshma Pattan
doc/guides/contributing/patches.rst Here are some guidelines for the body of a commit message: · line 260
Quoted 6 lines
doc/guides/contributing/patches.rst +1
-1- 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: %ae%nCc: [email protected]'" The output of ``git fixline <SHA>`` must then be added to the commit message::While a good idea, we don't always want to CC stable for all fixes, as fixes for commits in the current release obviously don't need backports.
I've done something which proposes some Cc, some time ago:
fixline = "!f () { git log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae' $1 ; ( git tag -l --contains $1 | head -n1 | sed 's,^v,,' | sed 's,-rc.*,,' ; for i in 1 2 ; do make showversion | cut -d'.' -f-2 ; done ) | uniq -u | head -n1 | sed 's,.*,Cc: [email protected],' ;}; f"
Quoted 3 lines
I suggest the stable maintainers comment on whether receiving these additional patches would be a problem for them, or if their tooling is sufficiency advanced for them to ignore these without issue...
Anyway, the developer must think about when backport is really needed. It is a bad idea to document it as automatic.