[PATCH] dim: Dumbest base64 parser ever for apply-pull
Jani Nikula
jani.nikula at linux.intel.com
Fri Dec 14 14:46:55 UTC 2018
On Fri, 14 Dec 2018, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> Avoids me having to ask patchwork to decode them for me. Worked on the
> 2 pulls from Dave and Inki I tried it on.
message_print_body does it more robustly.
BR,
Jani.
>
> Cc: Dave Airlie <airlied at gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> 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)
--
Jani Nikula, Intel Open Source Graphics Center
More information about the dim-tools
mailing list