git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-am: force egrep to use correct characters set

From
Christian Himpel <chressie@googlemail.com>
Date
Sep 25, 2009, 16:43 UTC
Message-ID
<f0bd48168975c3b2328cf26f9a37a0f54b898473.1253896646.git.chressie@gmail.com>
In-Reply-To
<215cc4f241162377b9249c2b3d74050cc77bac16.1253893253.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.

Signed-off-by: Christian Himpel <chressie@gmail.com>
---
sorry for being so noisy, but forgot to signoff last time
 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
Previous: Christian HimpelNext: Jeff King
Message 4 of 11 in “git-am: fixed patch_format detection according to RFC2822”
  1. 1/2 git-am: fixed patch_format detection according to RFC2822Christian Himpel, Sep 25, 2009
  2. 2/2 git-am: force egrep to use correct characters setChristian Himpel, Sep 25, 2009
  3. 2/2 git-am: force egrep to use correct characters setChristian Himpel, Sep 25, 2009
  4. git-am: force egrep to use correct characters setChristian Himpel, Sep 25, 2009
  5. Jeff KingSep 27, 2009
  6. Christian HimpelSep 28, 2009
  7. Jeff KingSep 28, 2009
  8. Johannes SixtSep 28, 2009
  9. Christian HimpelSep 28, 2009
  10. Johannes SixtSep 28, 2009
  11. Christian HimpelSep 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.