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.nik...@intel.com>
Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.v...@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

_______________________________________________
dim-tools mailing list
dim-tools@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dim-tools

Reply via email to