Skip to content
Snippets Groups Projects
Commit a3114926 authored by Rodrigo Vivi's avatar Rodrigo Vivi
Browse files

dim: Properly handle series on apply_branch


So far we could use *dim* to apply a whole series
in a mbox, but only the very last patch was receiving
all the checks and patchwork link.

So this patch remove this limitation by using git mailsplit
to split the mbox and than use git am and checks individually
on each patch.

v2: a. Don't loop with `ls $dir` nor use ls. Shellcheck recommends
       globs instead. Reference: SC2045
    c. Split the apply patch in a separated function as suggested
       by Jani.
    b. Use -b on git mailsplit so it will automatically it is not
       an mbox file and parse it assuming a single mail message.
       This fixes the issue Jani notice with input directly from
       MUA: "corrupt mailbox".
v3: Pass $@ to apply_patch function and properly handle the shift.
    Handle returns. If any patch in the series had some kind of goof
    return 1.
v4: a. Fix "@"
    b. handle in a way that rv gets propagated with set -e
    c. Delete temporary files and directory.

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 1f8ffdd5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment