[PATCH] dim: Refuse to push with leftover dim extract-tags marker

Ville Syrjala ville.syrjala at linux.intel.com
Mon Dec 16 15:31:04 UTC 2019


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>
---
 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



More information about the dim-tools mailing list