Teach tree_entry_interesting() that the tree entries are sorted.
[gitweb.git] / commit.c
index 5b9234e12e8d1ef46d0d53b15cea850dfbde14c2..718e568855a37586f99f20bcfafd44cf3aa2b657 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -706,7 +706,7 @@ static char *logmsg_reencode(const struct commit *commit,
        encoding = get_header(commit, "encoding");
        use_encoding = encoding ? encoding : utf8;
        if (!strcmp(use_encoding, output_encoding))
-               out = strdup(commit->buffer);
+               out = xstrdup(commit->buffer);
        else
                out = reencode_string(commit->buffer,
                                      output_encoding, use_encoding);