Sometimes they get split, and then we lose the branch, pulling the
default branch.

Cc: Maxime Ripard <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
---
 dim | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dim b/dim
index 10f823283b55..06188fea94c6 100755
--- a/dim
+++ b/dim
@@ -1089,7 +1089,10 @@ function dim_apply_pull
 
        cat > $file
 
-       pull_branch=$(message_print_body "$file" | sed -ne '/[gG]it repository 
at:$/{n;n;p}')
+       pull_branch=$(message_print_body "$file" |
+               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)
 
        if [[ -z "$pull_branch" ]] ; then
-- 
2.20.1

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

Reply via email to