{"thread":{"id":"2450","subject":"[PATCH] Do not lose author name information to locale gotchas.","startedAt":"2005-11-11T07:42:14Z","lastAt":"2005-11-11T07:42:14Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"11560","messageId":"7vk6ffska1.fsf@assigned-by-dhcp.cox.net","threadId":"2450","inReplyTo":null,"subject":"[PATCH] Do not lose author name information to locale gotchas.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-11-11T07:42:14Z","receivedAt":"2005-11-11T07:42:14Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"I noticed format-patch loses authorship information of Lukas' patch\nwhen I run git tools with LC_LANG set to ja_JP.  It turns out that\nthe sed script to set environment variables were not working on his\nname (encoded in UTF-8), which is unfortunate but technically correct.\n\nForce sed invocation under C locale because we always want literal byte\nsemantics.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\n\n * I might have screwed up people's names already without\n   noticing; if that happened to you, please forgive me.  I\n   think this patch fixes all the problematic places...\n\n git-commit.sh       |    2 +-\n git-format-patch.sh |    2 +-\n git-revert.sh       |    2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\napplies-to: 8eacf17303188e55375f76bea8051555ba1baf02\n0375d39e7d3052bdb9b21f984a7b7d2b02e627a5\ndiff --git a/git-commit.sh b/git-commit.sh\nindex daf90f1..41955e8 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -184,7 +184,7 @@ then\n \t\t}\n \t\t'\n \t\tset_author_env=`git-cat-file commit \"$use_commit\" |\n-\t\tsed -ne \"$pick_author_script\"`\n+\t\tLANG=C LC_ALL=C sed -ne \"$pick_author_script\"`\n \t\teval \"$set_author_env\"\n \t\texport GIT_AUTHOR_NAME\n \t\texport GIT_AUTHOR_EMAIL\ndiff --git a/git-format-patch.sh b/git-format-patch.sh\nindex 548d2d5..7ee5d32 100755\n--- a/git-format-patch.sh\n+++ b/git-format-patch.sh\n@@ -201,7 +201,7 @@ process_one () {\n \t    ;;\n \tesac\n \n-\teval \"$(sed -ne \"$whosepatchScript\" $commsg)\"\n+\teval \"$(LANG=C LC_ALL=C sed -ne \"$whosepatchScript\" $commsg)\"\n \ttest \"$author,$au\" = \",$me\" || {\n \t\tmailScript=\"$mailScript\"'\n \ta\\\ndiff --git a/git-revert.sh b/git-revert.sh\nindex dfd914c..4154fe0 100755\n--- a/git-revert.sh\n+++ b/git-revert.sh\n@@ -112,7 +112,7 @@ cherry-pick)\n \t\tq\n \t}'\n \tset_author_env=`git-cat-file commit \"$commit\" |\n-\tsed -ne \"$pick_author_script\"`\n+\tLANG=C LC_ALL=C sed -ne \"$pick_author_script\"`\n \teval \"$set_author_env\"\n \texport GIT_AUTHOR_NAME\n \texport GIT_AUTHOR_EMAIL\n---\n0.99.9.GIT\n"}]}