]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pretty.c
strbuf: add and use strbuf_insertstr()
[thirdparty/git.git] / pretty.c
index 305e903192a7ae4fb125090436130f434bd46e7c..1cd6e93e47eea577525f6cb9a15ee7554ec153f2 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -1581,9 +1581,9 @@ static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
                        strbuf_setlen(sb, sb->len - 1);
        } else if (orig_len != sb->len) {
                if (magic == ADD_LF_BEFORE_NON_EMPTY)
-                       strbuf_insert(sb, orig_len, "\n", 1);
+                       strbuf_insertstr(sb, orig_len, "\n");
                else if (magic == ADD_SP_BEFORE_NON_EMPTY)
-                       strbuf_insert(sb, orig_len, " ", 1);
+                       strbuf_insertstr(sb, orig_len, " ");
        }
        return consumed + 1;
 }