[PATCH 2/2 v2] git-am: force egrep to use correct characters set
- From
Christian Himpel <chressie@googlemail.com>
- Date
- Sep 25, 2009, 15:45 UTC
- Message-ID
- <215cc4f241162377b9249c2b3d74050cc77bac16.1253893253.git.chressie@gmail.com>
- In-Reply-To
- <dc8a4205128d65e69587292a42c714792315a9df.1253891124.git.chressie@gmail.com>
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. ---
This is probably a saner approach :)
git-am.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-am.sh b/git-am.sh index 0ddd80f..c132f50 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 '^[!-9;-~]+:' >/dev/null || + LC_ALL=C egrep -v '^[!-9;-~]+:' >/dev/null || patch_format=mbox fi } < "$1" || clean_abort
-- 1.6.4.4