[PATCH] dim: don't choke on quoted pull requests

Daniel Vetter daniel.vetter at ffwll.ch
Wed Dec 18 12:07:55 UTC 2019


Maintainers seem to like to supply fixed up pull requests in replies
to their previous attempt. Current dim then choked on that pile,
trying to pull the old one (but getting tripped by the various >
quotation marks).

Teach dim to look for a non-quoted pull.

Cc: Dave Airlie <airlied at gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
 dim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dim b/dim
index 42f0c87c116b..0edb6c589e3b 100755
--- a/dim
+++ b/dim
@@ -1122,7 +1122,7 @@ function dim_apply_pull
 	cat > $file
 
 	pull_branch=$(message_print_body "$file" |
-		sed -ne '/[gG]it repository at:$/,/for you to fetch/{p}' |
+		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)
-- 
2.24.0



More information about the dim-tools mailing list