Avoids me having to ask patchwork to decode them for me. Worked on the
2 pulls from Dave and Inki I tried it on.

Cc: Dave Airlie <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
---
 dim | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/dim b/dim
index 70939ff9abee..0bd9b6c692f0 100755
--- a/dim
+++ b/dim
@@ -999,8 +999,14 @@ function dim_apply_pull
        from_line=$(grep '^From:' $file)
 
        if [[ -z "$pull_branch" ]] ; then
-               echoerr "no pull request found"
-               return 1
+               if grep -q "Content-Transfer-Encoding: base64" $file ; then
+                       pull_branch=$(sed -e '0,/^$/d' $file | base64 --decode 
| sed -ne '/[gG]it repository at:$/{n;n;p}')
+               fi
+
+               if [[ -z "$pull_branch" ]] ; then
+                       echoerr "no pull request found"
+                       return 1
+               fi
        fi
 
        message_id=$(message_get_id $file)
-- 
2.20.0.rc1

_______________________________________________
dim-tools mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dim-tools

Reply via email to