summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-19 18:38:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-09-19 18:38:39 (GMT)
commit56feed1c7641bbf7920efe6607c6a04309073baa (patch)
tree74ec5c25bd752dfe55be3a4c13147af5c5dfbfc1 /merge-recursive.c
parent9ee9c9d068d841908c7022aad566096be8a439a9 (diff)
parent415792edf51b2f87a58a942016a24a2e86a4218b (diff)
downloadgit-56feed1c7641bbf7920efe6607c6a04309073baa.zip
git-56feed1c7641bbf7920efe6607c6a04309073baa.tar.gz
git-56feed1c7641bbf7920efe6607c6a04309073baa.tar.bz2
Merge branch 'rs/export-strbuf-addchars'
Code clean-up. * rs/export-strbuf-addchars: strbuf: use strbuf_addchars() for adding a char multiple times strbuf: export strbuf_addchars()
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 8ab944c..22315c3 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -163,9 +163,7 @@ static void output(struct merge_options *o, int v, const char *fmt, ...)
if (!show(o, v))
return;
- strbuf_grow(&o->obuf, o->call_depth * 2 + 2);
- memset(o->obuf.buf + o->obuf.len, ' ', o->call_depth * 2);
- strbuf_setlen(&o->obuf, o->obuf.len + o->call_depth * 2);
+ strbuf_addchars(&o->obuf, ' ', o->call_depth * 2);
va_start(ap, fmt);
strbuf_vaddf(&o->obuf, fmt, ap);