X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-am.sh;h=1a114bcc0809836ed4edaa0866704b899e587cd2;hb=ee34518d629331dadd58b1a75294369d679eda8b;hp=39f255209e11283a0c3d402f215ff6c187922ea7;hpb=b0d3e9baaa16c805ef941e8f26d55fb23f091ef5;p=git.git diff --git a/git-am.sh b/git-am.sh index 39f25520..1a114bcc 100755 --- a/git-am.sh +++ b/git-am.sh @@ -160,10 +160,7 @@ else # Start afresh. mkdir -p "$dotest" || exit - # cat does the right thing for us, including '-' to mean - # standard input. - cat "$@" | - git-mailsplit -d$prec "$dotest/" >"$dotest/last" || { + git-mailsplit -d"$prec" -o"$dotest" -b -- "$@" > "$dotest/last" || { rm -fr "$dotest" exit 1 } @@ -252,6 +249,13 @@ do GIT_AUTHOR_NAME="$(sed -n '/^Author/ s/Author: //p' "$dotest/info")" GIT_AUTHOR_EMAIL="$(sed -n '/^Email/ s/Email: //p' "$dotest/info")" GIT_AUTHOR_DATE="$(sed -n '/^Date/ s/Date: //p' "$dotest/info")" + + if test -z "$GIT_AUTHOR_EMAIL" + then + echo "Patch does not have a valid e-mail address." + stop_here $this + fi + export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE SUBJECT="$(sed -n '/^Subject/ s/Subject: //p' "$dotest/info")"