Skip to content

Commit 6900d75

Browse files
chressiespearce
authored andcommitted
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 <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent fb3650e commit 6900d75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-am.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ check_patch_format () {
205205
# and see if it looks like that they all begin with the
206206
# header field names...
207207
sed -n -e '/^$/q' -e '/^[ ]/d' -e p "$1" |
208-
egrep -v '^[A-Za-z]+(-[A-Za-z]+)*:' >/dev/null ||
208+
egrep -v '^[!-9;-~]+:' >/dev/null ||
209209
patch_format=mbox
210210
fi
211211
} < "$1" || clean_abort

0 commit comments

Comments
 (0)