From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: [PATCH] Do not lose author name information to locale gotchas.
Date: Thu, 10 Nov 2005 23:42:14 -0800 [thread overview]
Message-ID: <7vk6ffska1.fsf@assigned-by-dhcp.cox.net> (raw)
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 <junkio@cox.net>
---
* I might have screwed up people's names already without
noticing; if that happened to you, please forgive me. I
think this patch fixes all the problematic places...
git-commit.sh | 2 +-
git-format-patch.sh | 2 +-
git-revert.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
applies-to: 8eacf17303188e55375f76bea8051555ba1baf02
0375d39e7d3052bdb9b21f984a7b7d2b02e627a5
diff --git a/git-commit.sh b/git-commit.sh
index daf90f1..41955e8 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 548d2d5..7ee5d32 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 dfd914c..4154fe0 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
---
0.99.9.GIT
reply other threads:[~2005-11-11 7:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vk6ffska1.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox