reencode_string(): introduce and use same_encoding()
[gitweb.git] / pretty.c
index 8b1ea9ffad2a0b5c5cb5c15cc5057a8a7132da07..e87fe9fec33babf783852f4a4abf536f579e5767 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -504,7 +504,7 @@ char *logmsg_reencode(const struct commit *commit,
                return NULL;
        encoding = get_header(commit, "encoding");
        use_encoding = encoding ? encoding : utf8;
-       if (!strcmp(use_encoding, output_encoding))
+       if (same_encoding(use_encoding, output_encoding))
                if (encoding) /* we'll strip encoding header later */
                        out = xstrdup(commit->buffer);
                else