mirror of
https://github.com/git/git
synced 2024-08-26 19:19:18 +00:00
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 <junkio@cox.net>
This commit is contained in:
parent
605607cc62
commit
e3e291fc07
|
@ -184,7 +184,7 @@ then
|
||||||
}
|
}
|
||||||
'
|
'
|
||||||
set_author_env=`git-cat-file commit "$use_commit" |
|
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"
|
eval "$set_author_env"
|
||||||
export GIT_AUTHOR_NAME
|
export GIT_AUTHOR_NAME
|
||||||
export GIT_AUTHOR_EMAIL
|
export GIT_AUTHOR_EMAIL
|
||||||
|
|
|
@ -201,7 +201,7 @@ process_one () {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
eval "$(sed -ne "$whosepatchScript" $commsg)"
|
eval "$(LANG=C LC_ALL=C sed -ne "$whosepatchScript" $commsg)"
|
||||||
test "$author,$au" = ",$me" || {
|
test "$author,$au" = ",$me" || {
|
||||||
mailScript="$mailScript"'
|
mailScript="$mailScript"'
|
||||||
a\
|
a\
|
||||||
|
|
|
@ -112,7 +112,7 @@ cherry-pick)
|
||||||
q
|
q
|
||||||
}'
|
}'
|
||||||
set_author_env=`git-cat-file commit "$commit" |
|
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"
|
eval "$set_author_env"
|
||||||
export GIT_AUTHOR_NAME
|
export GIT_AUTHOR_NAME
|
||||||
export GIT_AUTHOR_EMAIL
|
export GIT_AUTHOR_EMAIL
|
||||||
|
|
Loading…
Reference in a new issue