[PATCH] dim: Reduce noise for already cherry-picked patches.

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Feb 26 18:54:04 UTC 2019


When cherry picking drm-intel-next-fixes I started getting a lot
of noise for patches who were already part of drm-intel-fixes.

We are filtering the patches with "cherry-picked .*" but we
are not checking if commit itself is already part of the other
branch.

So let's do this and minimize the output error for a clean
and better actionable result.

Cc: Jani Nikula <jani.nikula at intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 dim | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/dim b/dim
index 004ec69080e2..676e68f473f9 100755
--- a/dim
+++ b/dim
@@ -1372,6 +1372,13 @@ function cherry_pick_branch
 
 		# Look at history for already cherry-picked fixes.
 		# Note: use *local* branches to account for unpushed commits.
+		git branch drm-intel-fixes drm-intel-next-fixes \
+		    --contains $commit > $log
+		if [ "$(cat $log)" != "" ]; then
+			echo "Already part of $(tr -d " " < $log | tr "\n" " "). OK."
+			continue
+		fi
+
 		git log drm-intel-fixes --format=format:%h --after=6months \
 		    --grep="cherry picked .* $commit" > $log
 		if [ "$(cat $log)" = "" ]; then
-- 
2.20.1



More information about the dim-tools mailing list