aboutsummaryrefslogtreecommitdiffstats
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-02-17 13:22:17 -0800
committerJunio C Hamano <gitster@pobox.com>2020-02-17 13:22:17 -0800
commit9f3f38769d49255d3fbf97f35a0dec591de17db3 (patch)
treed0b4e0ef5aab675c75932a5cf888c4f32397497f /pretty.c
parentcbecc168d4264d93295cd1e0a48dc19f0ed1880c (diff)
parent517b60564e2c69cbb79895e04b24a6393273398f (diff)
downloadgit-9f3f38769d49255d3fbf97f35a0dec591de17db3.tar.gz
Merge branch 'rs/strbuf-insertstr'
Code clean-up. * rs/strbuf-insertstr: mailinfo: don't insert header prefix for handle_content_type() strbuf: add and use strbuf_insertstr()
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pretty.c b/pretty.c
index f5fbbc5ffb..28afc701b6 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1609,9 +1609,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;
}