]> Pileus Git - ~andy/git/commitdiff
mailinfo: fix 'fatal: cannot convert from utf-8 to utf-8'
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Tue, 24 Jul 2007 00:03:26 +0000 (01:03 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 24 Jul 2007 05:38:50 +0000 (22:38 -0700)
For some reason, I got this error message.  Maybe it does not make sense,
but then we should not really try to convert the text when it is not
necessary.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-mailinfo.c

index a37a4fff39afe6bafaace59b710e1dfdc56bf35a..b4f6e913b3f6c74ab2eae0f95ae01250dc3351e9 100644 (file)
@@ -529,6 +529,8 @@ static void convert_to_utf8(char *line, const char *charset)
                        return;
        }
 
+       if (!strcmp(metainfo_charset, charset))
+               return;
        out = reencode_string(line, metainfo_charset, charset);
        if (!out)
                die("cannot convert from %s to %s\n",