提交 6900d750 编写于 作者: C Christian Himpel 提交者: Shawn O. Pearce

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: NChristian Himpel <chressie@gmail.com>
Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
上级 fb3650ed
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册