X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-am.sh;h=c8b9cbb101f1319b6efd78ff6ae9c63efcdc991b;hb=aa14013abf27637dc2a2c0bee56fb98a981ee08d;hp=2f46fda47bc1aa0a345c5cb7293724497965d75e;hpb=df91d0e4d30ddc9bf2c55e3a63be9cb5318a409a;p=git.git diff --git a/git-am.sh b/git-am.sh index 2f46fda47..c8b9cbb10 100755 --- a/git-am.sh +++ b/git-am.sh @@ -205,7 +205,8 @@ check_patch_format () { # discarding the indented remainder of folded lines, # and see if it looks like that they all begin with the # header field names... - sed -n -e '/^$/q' -e '/^[ ]/d' -e p "$1" | + tr -d '\015' <"$1" | + sed -n -e '/^$/q' -e '/^[ ]/d' -e p | sane_egrep -v '^[!-9;-~]+:' >/dev/null || patch_format=mbox fi