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). 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 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dim b/dim index 5cf2fdcc40be..e2ec21692d80 100755 --- a/dim +++ b/dim @@ -450,16 +450,19 @@ def print_msg(file): print_msg(open('$1', 'r')) EOF } - # append all arguments as tags at the end of the commit message of HEAD function dim_commit_add_tag { for arg; do + echo foo + echo sed "\$a${arg}" # the first sed deletes all trailing blank lines at the end + echo bla git log -1 --pretty=%B | \ sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' | \ sed "\$a${arg}" | \ git commit --amend -F- + echo foo done } @@ -1125,7 +1128,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