Code

gitweb: Add optional extra parameter to die_error, for extended explanation
[git.git] / git-am.sh
index 2f46fda47bc1aa0a345c5cb7293724497965d75e..c8b9cbb101f1319b6efd78ff6ae9c63efcdc991b 100755 (executable)
--- 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