dim blew up on the pull from Thomas:

https://patchwork.freedesktop.org/patch/348981/

Thomas helpfully added an in-body From: line, similar to how git
format-patch does. But our dim parsing choked on the double From: line
that resulted in.

Assume that if there's a 2nd From: line it's there for a good reason
and pick that one (like git apply-mbox).

v2: Ditch the debug stuff ... silly me.

Cc: "Thomas Hellström (VMware)" <thomas...@shipmail.org>
Cc: Dave Airlie <airl...@gmail.com>
Reported-by: Dave Airlie <airl...@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vet...@intel.com>
---
 dim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dim b/dim
index 5cf2fdcc40be..1e61fe2f9ed9 100755
--- a/dim
+++ b/dim
@@ -1125,7 +1125,7 @@ function dim_apply_pull
                sed -ne '/^[^>].*[gG]it repository at:$/,/for you to fetch/{p}' 
|
                sed -ne '3,$p' | sed -ne '0,/^$/p' | tr '\n' ' ')
 
-       from_line=$(grep '^From:' $file)
+       from_line=$(grep '^From:' $file | tail -n 1)
 
        if [[ -z "$pull_branch" ]] ; then
                echoerr "no pull request found"
-- 
2.24.1

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

Reply via email to