X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-applymbox.sh;h=3efd6a746407bdc38ba9d251332427c508e5ee40;hb=885b98107547fe3f6d17ca0af0578e040f7600d0;hp=24d4a8cb4eb95a5201c205be879d3ac6a62a8a15;hpb=93dcab2937624ebb97f91807576cddb242a55a46;p=git.git diff --git a/git-applymbox.sh b/git-applymbox.sh index 24d4a8cb4..3efd6a746 100755 --- a/git-applymbox.sh +++ b/git-applymbox.sh @@ -18,22 +18,21 @@ ## ## git-am is supposed to be the newer and better tool for this job. +USAGE='[-u] [-k] [-q] [-m] (-c .dotest/ | mbox) [signoff]' . git-sh-setup -usage () { - echo >&2 "applymbox [-u] [-k] [-q] [-m] (-c .dotest/ | mbox) [signoff]" - exit 1 -} +git var GIT_COMMITTER_IDENT >/dev/null || exit -keep_subject= query_apply= continue= utf8= resume=t +keep_subject= query_apply= continue= utf8=-u resume=t while case "$#" in 0) break ;; esac do case "$1" in -u) utf8=-u ;; + -n) utf8=-n ;; -k) keep_subject=-k ;; -q) query_apply=t ;; -c) continue="$2"; resume=f; shift ;; - -m) fallback_3way=t ;; + -m) fall_back_3way=t ;; -*) usage ;; *) break ;; esac @@ -78,6 +77,10 @@ do *) git-mailinfo $keep_subject $utf8 \ .dotest/msg .dotest/patch <$i >.dotest/info || exit 1 + test -s .dotest/patch || { + echo "Patch is empty. Was is split wrong?" + exit 1 + } git-stripspace < .dotest/msg > .dotest/msg-clean ;; esac