git-am: force egrep to use correct characters set
According to egrep(1) the US-ASCII table is used when LC_ALL=C is set. We do not rely here on the LC_ALL value we get from the environment. Signed-off-by: Christian Himpel <chressie@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Christian Himpel committed
Sep 25, 2009 at 18:43 UTC
fa9d3485ead15387fd76a35284bd3ffb32d7c6c7
1 file changed
+1
-1
git-am.sh
+1
-1
@@ -205,7 +205,7 @@ check_patch_format () {
205
# and see if it looks like that they all begin with the
206
# header field names...
207
sed -n -e '/^$/q' -e '/^[ ]/d' -e p "$1" |
208
- egrep -v '^[!-9;-~]+:' >/dev/null ||
208
+ LC_ALL=C egrep -v '^[!-9;-~]+:' >/dev/null ||
209
patch_format=mbox
210
fi
211
} < "$1" || clean_abort