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:Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by:
Jani Nikula <jani.nikula@intel.com>
Loading
Please register or sign in to comment