[PATCH] dim: Refuse to push with leftover dim extract-tags marker
Daniel Vetter
daniel at ffwll.ch
Tue Dec 17 12:58:27 UTC 2019
On Mon, Dec 16, 2019 at 05:31:04PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Refuse the push if there are leftover markers from
> dim extract-tags still present in the commit messages.
>
> A few of these slipped through to drm-misc-next. Let's try
> to avoid that in the future.
>
> Cc: Paul Cercueil <paul at crapouillou.net>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Works like a charm, thanks a lot for catching this, patch pushed.
-Daniel
> ---
> dim | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index 1c2da8034cd3..42f0c87c116b 100755
> --- a/dim
> +++ b/dim
> @@ -99,6 +99,8 @@ dim_pull_request_recipients=(
> # integration configuration
> dim_integration_config=nightly.conf
>
> +dim_extract_tags_marker="# *** extracted tags ***"
> +
> #
> # Only function and alias definitions until the command line argument parsing
> # and subcommand handling at the end.
> @@ -911,6 +913,12 @@ function checkpatch_commit_push
> rv=1
> fi
>
> + # check for leftover dim extract-tags marker
> + if git show -s $sha1 | grep -qF "$dim_extract_tags_marker" ; then
> + echoerr "$cite: leftover dim extract-tags marker."
> + rv=1
> + fi
> +
> if ! checkpatch_fixes_tag $sha1 ; then
> rv=1
> fi
> @@ -1724,7 +1732,7 @@ function dim_extract_tags
> return 0
> fi
>
> - tags=$(printf -- "# *** extracted tags ***\n%s" "$tags")
> + tags=$(printf -- "$dim_extract_tags_marker\n%s" "$tags")
>
> git filter-branch -f --msg-filter "cat ; echo \"$tags\"" $range
> }
> --
> 2.23.0
>
> _______________________________________________
> dim-tools mailing list
> dim-tools at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dim-tools
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the dim-tools
mailing list