X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-applymbox.sh;h=5569fdcc3463b214411d5a168a00783b0d390044;hb=fd7e9fb7ae206a64b87c7faecfc88716e98a7577;hp=79abce2a258cd3c4f701f58328bba9b87a029efc;hpb=4ebe63dfe6f2a8c652ecd8dfe6ab8a77b6c82b2f;p=git.git diff --git a/git-applymbox.sh b/git-applymbox.sh index 79abce2a..5569fdcc 100755 --- a/git-applymbox.sh +++ b/git-applymbox.sh @@ -15,13 +15,13 @@ ## Pay a special attention to the commit log message if you do this and ## use a Signoff_file, because applypatch wants to append the sign-off ## message to msg-clean every time it is run. +## +## git-am is supposed to be the newer and better tool for this job. -. git-sh-setup || die "Not a git archive" +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 while case "$#" in 0) break ;; esac @@ -31,7 +31,7 @@ do -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 @@ -42,7 +42,8 @@ case "$continue" in '') rm -rf .dotest mkdir .dotest - git-mailsplit "$1" .dotest || exit 1 + num_msgs=$(git-mailsplit "$1" .dotest) || exit 1 + echo "$num_msgs patch(es) to process." shift esac