From: Daniel Vetter <daniel@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] dim: Add helper command to generate Fixes: lines
Date: Wed, 23 Dec 2015 14:53:01 +0100 [thread overview]
Message-ID: <20151223135301.GS30437@phenom.ffwll.local> (raw)
In-Reply-To: <1450878641-12602-1-git-send-email-daniel.vetter@ffwll.ch>
On Wed, Dec 23, 2015 at 02:50:41PM +0100, Daniel Vetter wrote:
> 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 <daniel.vetter@intel.com>
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
> ---
> bash_completion | 4 ++--
> dim | 5 +++++
> dim.rst | 5 +++++
> drm-intel.rst | 12 ++++++++++--
> 4 files changed, 22 insertions(+), 4 deletions(-)
>
> diff --git a/bash_completion b/bash_completion
> index 7f129ca818eb..e44e5fc844b4 100644
> --- a/bash_completion
> +++ b/bash_completion
> @@ -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)
> diff --git a/dim b/dim
> index 9ecb95053718..c749cebd1187 100755
> --- a/dim
> +++ b/dim
> @@ -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 $@
> ;;
> diff --git a/dim.rst b/dim.rst
> index 567bcb8bb13e..e37d6630aecb 100644
> --- a/dim.rst
> +++ b/dim.rst
> @@ -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
> diff --git a/drm-intel.rst b/drm-intel.rst
> index 0e774047b1b8..6b3b469e1dc6 100644
> --- a/drm-intel.rst
> +++ b/drm-intel.rst
> @@ -163,8 +163,16 @@ or, if the fix is relevant for a released kernel,
>
> Cc: stable@vger.kernel.org
>
> -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.
> --
> 2.6.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-12-23 13:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 12:10 [PATCH] dim: Add helper command to generate Fixes: lines Daniel Vetter
2015-12-23 13:50 ` Daniel Vetter
2015-12-23 13:53 ` Daniel Vetter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151223135301.GS30437@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox