From: Junio C Hamano Date: Fri, 11 Nov 2005 07:34:08 +0000 (-0800) Subject: Do not lose author name information to locale gotchas. X-Git-Tag: v0.99.9h^2~31 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=e3e291fc07b49b74bb655ca854bdb19e849e044c;p=git.git Do not lose author name information to locale gotchas. I noticed format-patch loses authorship information of Lukas' patch when I run git tools with LC_LANG set to ja_JP. It turns out that the sed script to set environment variables were not working on his name (encoded in UTF-8), which is unfortunate but technically correct. Force sed invocation under C locale because we always want literal byte semantics. Signed-off-by: Junio C Hamano --- diff --git a/git-commit.sh b/git-commit.sh index daf90f1e..41955e8e 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -184,7 +184,7 @@ then } ' set_author_env=`git-cat-file commit "$use_commit" | - sed -ne "$pick_author_script"` + LANG=C LC_ALL=C sed -ne "$pick_author_script"` eval "$set_author_env" export GIT_AUTHOR_NAME export GIT_AUTHOR_EMAIL diff --git a/git-format-patch.sh b/git-format-patch.sh index 548d2d58..7ee5d328 100755 --- a/git-format-patch.sh +++ b/git-format-patch.sh @@ -201,7 +201,7 @@ process_one () { ;; esac - eval "$(sed -ne "$whosepatchScript" $commsg)" + eval "$(LANG=C LC_ALL=C sed -ne "$whosepatchScript" $commsg)" test "$author,$au" = ",$me" || { mailScript="$mailScript"' a\ diff --git a/git-revert.sh b/git-revert.sh index dfd914cf..4154fe0d 100755 --- a/git-revert.sh +++ b/git-revert.sh @@ -112,7 +112,7 @@ cherry-pick) q }' set_author_env=`git-cat-file commit "$commit" | - sed -ne "$pick_author_script"` + LANG=C LC_ALL=C sed -ne "$pick_author_script"` eval "$set_author_env" export GIT_AUTHOR_NAME export GIT_AUTHOR_EMAIL