{"thread":{"id":"9191","subject":"[PATCH] mailinfo: fix 'fatal: cannot convert from utf-8 to utf-8'","startedAt":"2007-07-24T00:03:26Z","lastAt":"2007-07-24T00:03:26Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"48383","messageId":"Pine.LNX.4.64.0707240102390.14781@racer.site","threadId":"9191","inReplyTo":null,"subject":"[PATCH] mailinfo: fix 'fatal: cannot convert from utf-8 to utf-8'","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-24T00:03:26Z","receivedAt":"2007-07-24T00:03:26Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nFor some reason, I got this error message.  Maybe it does not make sense,\nbut then we should not really try to convert the text when it is not\nnecessary.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tThis bit me when I tried to apply the most recent Japanese \n\ttranslation patch to git-gui-i18n.\n\n builtin-mailinfo.c |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-mailinfo.c b/builtin-mailinfo.c\nindex a37a4ff..b4f6e91 100644\n--- a/builtin-mailinfo.c\n+++ b/builtin-mailinfo.c\n@@ -529,6 +529,8 @@ static void convert_to_utf8(char *line, const char *charset)\n \t\t\treturn;\n \t}\n \n+\tif (!strcmp(metainfo_charset, charset))\n+\t\treturn;\n \tout = reencode_string(line, metainfo_charset, charset);\n \tif (!out)\n \t\tdie(\"cannot convert from %s to %s\\n\",\n-- \n1.5.3.rc2.32.g35c5b-dirty\n"}]}