dim: Add helper command to generate Fixes: lines
PATCH 1/1 dim: Add helper command to generate Fixes: lines
Unfortunately a simple git alias doesn't work since the linux kernel wants a sha1 shortened to 12 characters, and the git commit prettifying can't do that with e.g. %12h. sed to the rescue.
I'm using this when editing commit messages after applying (:read !dim fixes sha1 in vim).
--- bash_completion | 4 ++-- dim | 5 +++++ dim.rst | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-)
bash_completion +2 -2
@@ -29,7 +29,7 @@ _dim () cmds="$cmds magic-patch mp cd" cmds="$cmds magic-rebase-resolve mrr" cmds="$cmds apply-igt ai" - cmds="$cmds apply-resolved ar tc check-patch cp cherry-pick" + cmds="$cmds apply-resolved ar tc fixes check-patch cp cherry-pick" cmds="$cmds pull-request pull-request-fixes pull-request-next pull-request-next-fixes" cmds="$cmds update-next" cmds="$cmds create-branch remove-branch create-workdir for-each-workdirs fw"
@@ -73,7 +73,7 @@ _dim () COMPREPLY=( $( compgen -o nospace -W "-a" -- $cur ) ) fi ;; - tc) + tc|fixes) # FIXME needs a git sha1 ;; check-patch|cp)
dim +5 -0
@@ -839,6 +839,11 @@ case "$subcommand" in origin/master | sed 's/^ *//' fi ;; + fixes) + sha1=$1 + git log -1 $sha1 "--pretty=format:Fixes: %H (\"%s\")%n" | \ + sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/' + ;; check-patch|cp) dim_checkrange $@ ;;
dim.rst +5 -0
@@ -177,6 +177,11 @@ tc *commit-ish* Print the oldest Linux kernel release or -rc tag that contains the supplied *commit-ish*, or, if none do, print the upstream branches that contain it. +fixes *commit-ish* +--------------- +Print the Fixes: line for the supplied *commit-ish* in the linux kernel +CodingStyle approved format. + check-patch|cp [*commit-ish* [.. *commit-ish*]] ----------------------------------------------- Runs the given commit range commit-ish..commit-ish through the check tools. If
Signature · 6 lines
2.6.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 dim: Add helper command to generate Fixes: lines
Unfortunately a simple git alias doesn't work since the linux kernel wants a sha1 shortened to 12 characters, and the git commit prettifying can't do that with e.g. %12h. sed to the rescue.
I'm using this when editing commit messages after applying (:read !dim fixes sha1 in vim).
v2: Also update documentation.
--- bash_completion | 4 ++-- dim | 5 +++++ dim.rst | 5 +++++ drm-intel.rst | 12 ++++++++++-- 4 files changed, 22 insertions(+), 4 deletions(-)
bash_completion +2 -2
@@ -29,7 +29,7 @@ _dim () cmds="$cmds magic-patch mp cd" cmds="$cmds magic-rebase-resolve mrr" cmds="$cmds apply-igt ai" - cmds="$cmds apply-resolved ar tc check-patch cp cherry-pick" + cmds="$cmds apply-resolved ar tc fixes check-patch cp cherry-pick" cmds="$cmds pull-request pull-request-fixes pull-request-next pull-request-next-fixes" cmds="$cmds update-next" cmds="$cmds create-branch remove-branch create-workdir for-each-workdirs fw"
@@ -73,7 +73,7 @@ _dim () COMPREPLY=( $( compgen -o nospace -W "-a" -- $cur ) ) fi ;; - tc) + tc|fixes) # FIXME needs a git sha1 ;; check-patch|cp)
dim +5 -0
@@ -839,6 +839,11 @@ case "$subcommand" in origin/master | sed 's/^ *//' fi ;; + fixes) + sha1=$1 + git log -1 $sha1 "--pretty=format:Fixes: %H (\"%s\")%n" | \ + sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/' + ;; check-patch|cp) dim_checkrange $@ ;;
dim.rst +5 -0
@@ -177,6 +177,11 @@ tc *commit-ish* Print the oldest Linux kernel release or -rc tag that contains the supplied *commit-ish*, or, if none do, print the upstream branches that contain it. +fixes *commit-ish* +--------------- +Print the Fixes: line for the supplied *commit-ish* in the linux kernel +CodingStyle approved format. + check-patch|cp [*commit-ish* [.. *commit-ish*]] ----------------------------------------------- Runs the given commit range commit-ish..commit-ish through the check tools. If
drm-intel.rst +10 -2
@@ -163,8 +163,16 @@ or, if the fix is relevant for a released kernel, Cc: [email protected] -If the Cc: was forgotten, you can still reply to the list with that, just like -any other tags, and they should be picked up by whoever pushes the patch. +If your patch fixes a regression then please include a Fixes: line to help +maintainers where to cherry-pick a patch to. This also extremely useful for +product groups to know which bugfixes they must include. To follow the +recommended format please generate the Fixes: line using + + $ dim fixes $regressing_commit + +If the Cc: or Fixes: was forgotten, you can still reply to the list with that, +just like any other tags, and they should be picked up by whoever pushes the +patch. The maintainers will cherry-pick labeled patches from drm-intel-next-queued to the appropriate branches.
Signature · 6 lines
2.6.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 10 lines · Daniel Vetter
Unfortunately a simple git alias doesn't work since the linux kernel wants a sha1 shortened to 12 characters, and the git commit prettifying can't do that with e.g. %12h. sed to the rescue.
I'm using this when editing commit messages after applying (:read !dim fixes sha1 in vim).
v2: Also update documentation.
Signed-off-by Daniel Vetter <[email protected]>
Bit more explanation: Since we now push everything to dinq releases (and backports, but that's not new) happen asynchronously and it's harder to predict when a regression fix will land. Always adding the Fixes: line will allow maintainers to add Cc: stable if needed, in case a patch missed the last -fixes pull train before the release by a few days. -Daniel
Quoted 87 lines
--- bash_completion | 4 ++-- dim | 5 +++++ dim.rst | 5 +++++ drm-intel.rst | 12 ++++++++++-- 4 files changed, 22 insertions(+), 4 deletions(-)bash_completion +2
-2@@ -29,7 +29,7 @@ _dim () cmds="$cmds magic-patch mp cd" cmds="$cmds magic-rebase-resolve mrr" cmds="$cmds apply-igt ai" - cmds="$cmds apply-resolved ar tc check-patch cp cherry-pick" + cmds="$cmds apply-resolved ar tc fixes check-patch cp cherry-pick" cmds="$cmds pull-request pull-request-fixes pull-request-next pull-request-next-fixes" cmds="$cmds update-next" cmds="$cmds create-branch remove-branch create-workdir for-each-workdirs fw"@@ -73,7 +73,7 @@ _dim () COMPREPLY=( $( compgen -o nospace -W "-a" -- $cur ) ) fi ;; - tc) + tc|fixes) # FIXME needs a git sha1 ;; check-patch|cp)dim +5
-0@@ -839,6 +839,11 @@ case "$subcommand" in origin/master | sed 's/^ *//' fi ;; + fixes) + sha1=$1 + git log -1 $sha1 "--pretty=format:Fixes: %H (\"%s\")%n" | \ + sed -e 's/\([0-f]\{12\}\)[0-f]*/\1/' + ;; check-patch|cp) dim_checkrange $@ ;;dim.rst +5
-0@@ -177,6 +177,11 @@ tc *commit-ish* Print the oldest Linux kernel release or -rc tag that contains the supplied *commit-ish*, or, if none do, print the upstream branches that contain it. +fixes *commit-ish* +--------------- +Print the Fixes: line for the supplied *commit-ish* in the linux kernel +CodingStyle approved format. + check-patch|cp [*commit-ish* [.. *commit-ish*]] ----------------------------------------------- Runs the given commit range commit-ish..commit-ish through the check tools. Ifdrm-intel.rst +10
-2@@ -163,8 +163,16 @@ or, if the fix is relevant for a released kernel, Cc: [email protected] -If the Cc: was forgotten, you can still reply to the list with that, just like -any other tags, and they should be picked up by whoever pushes the patch. +If your patch fixes a regression then please include a Fixes: line to help +maintainers where to cherry-pick a patch to. This also extremely useful for +product groups to know which bugfixes they must include. To follow the +recommended format please generate the Fixes: line using + + $ dim fixes $regressing_commit + +If the Cc: or Fixes: was forgotten, you can still reply to the list with that, +just like any other tags, and they should be picked up by whoever pushes the +patch. The maintainers will cherry-pick labeled patches from drm-intel-next-queued to the appropriate branches.Signature · 1 line
2.6.4
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx