summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
authorChristian Himpel <chressie@googlemail.com>2009-09-25 15:14:31 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2009-09-25 22:35:05 (GMT)
commit6900d750f4894e7bee714874c04cc14312cd91ec (patch)
treee00cfeb69df95e78c65bcb690e3e523661a2507a /git-am.sh
parentfb3650ed100a549f80d822f28ccf0f82e9f75f3e (diff)
downloadgit-6900d750f4894e7bee714874c04cc14312cd91ec.zip
git-6900d750f4894e7bee714874c04cc14312cd91ec.tar.gz
git-6900d750f4894e7bee714874c04cc14312cd91ec.tar.bz2
git-am: fixed patch_format detection according to RFC2822
RFC2822 specifies in paragraph 3.6.8, that optional header fields are made up of any printable US-ASCII character except ' ' (space) and ':' (colon). The pattern for the egrep command is changed to match all of these characters. Signed-off-by: Christian Himpel <chressie@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-am.sh b/git-am.sh
index 26ffe70..0ddd80f 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -205,7 +205,7 @@ check_patch_format () {
# and see if it looks like that they all begin with the
# header field names...
sed -n -e '/^$/q' -e '/^[ ]/d' -e p "$1" |
- egrep -v '^[A-Za-z]+(-[A-Za-z]+)*:' >/dev/null ||
+ egrep -v '^[!-9;-~]+:' >/dev/null ||
patch_format=mbox
fi
} < "$1" || clean_abort