[PATCH v4 0/4] add --recode-patch parameter to mailinfo and am
- From
ZHANG, Le <r0bertz@gentoo.org>
- Date
- Nov 28, 2010, 19:10 UTC
- Message-ID
- <1290971417-4474-1-git-send-email-r0bertz@gentoo.org>
I have a translation project which uses UTF-8 as charset. So the patch must be encoded in UTF-8, not just the commit msg etc. And we use google group as our mailing list.
Recently, mails saved from gmail are encoded using local charset if all the characters in the patch are in that specific local charset even if the orignal mail is in UTF-8. This seems smart but it caused inconvenience for our project.
Since we have no control on what google will do, so I took another way, i.e. add this option to git-mailinfo. I hope this could benefit others as well.
Changelog:
v4 -> v3: * Added a target_charset parameter to convert_to_utf8() in mailinfo.c. * Introduced a new config varible: i18n.patchencoding, which will be used solely by --recode-patch parameter.
v2 -> v3: * Removed 'const' type qualifier from handle_patch()'s parameter * Fixed typos in commit msg
v1 -> v2: * Clarified how -u/--encoding is handled in git-mailinfo's documentation
ZHANG, Le (4): mailinfo.c: convert_to_utf8(): added a target_charset parameter i18n.patchencoding: introduce a new config variable git mailinfo: added a --recode-patch parameter git am: added a --recode-patch parameter
Documentation/git-am.txt | 4 ++++ Documentation/git-mailinfo.txt | 6 +++++- builtin/mailinfo.c | 27 +++++++++++++++++---------- cache.h | 1 + config.c | 3 +++ environment.c | 1 + git-am.sh | 13 +++++++++++-- 7 files changed, 42 insertions(+), 13 deletions(-)
-- 1.7.3.2.344.gb3680.dirty