Add strbuf_cmp.
[gitweb.git] / commit.c
index f86fa776c05b27d0e353cc70ee2b49d29a8de2e7..55b08ec0b93040785792afbe0c4013fe410a9d40 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -656,7 +656,7 @@ static char *replace_encoding_header(char *buf, const char *encoding)
        strbuf_attach(&tmp, buf, strlen(buf), strlen(buf) + 1);
        if (is_encoding_utf8(encoding)) {
                /* we have re-coded to UTF-8; drop the header */
-               strbuf_splice(&tmp, start, len, NULL, 0);
+               strbuf_remove(&tmp, start, len);
        } else {
                /* just replaces XXXX in 'encoding XXXX\n' */
                strbuf_splice(&tmp, start + strlen("encoding "),