aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin/log.c2
-rw-r--r--pretty.c2
-rw-r--r--rerere.c4
-rw-r--r--sha1_name.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/builtin/log.c b/builtin/log.c
index 27c1b65db..4389722b4 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -861,7 +861,7 @@ static void add_branch_description(struct strbuf *buf, const char *branch_name)
read_branch_desc(&desc, branch_name);
if (desc.len) {
strbuf_addch(buf, '\n');
- strbuf_add(buf, desc.buf, desc.len);
+ strbuf_addbuf(buf, &desc);
strbuf_addch(buf, '\n');
}
}
diff --git a/pretty.c b/pretty.c
index 8d201f6bd..6e5493472 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1376,7 +1376,7 @@ static size_t format_and_pad_commit(struct strbuf *sb, /* in UTF-8 */
case trunc_none:
break;
}
- strbuf_addstr(sb, local_sb.buf);
+ strbuf_addbuf(sb, &local_sb);
} else {
int sb_len = sb->len, offset = 0;
if (c->flush_type == flush_left)
diff --git a/rerere.c b/rerere.c
index d55aa8a01..04d923d8c 100644
--- a/rerere.c
+++ b/rerere.c
@@ -207,11 +207,11 @@ static int handle_path(unsigned char *sha1, struct rerere_io *io, int marker_siz
strbuf_reset(&one);
strbuf_reset(&two);
} else if (hunk == RR_SIDE_1)
- strbuf_addstr(&one, buf.buf);
+ strbuf_addbuf(&one, &buf);
else if (hunk == RR_ORIGINAL)
; /* discard */
else if (hunk == RR_SIDE_2)
- strbuf_addstr(&two, buf.buf);
+ strbuf_addbuf(&two, &buf);
else
rerere_io_putstr(buf.buf, io);
continue;
diff --git a/sha1_name.c b/sha1_name.c
index 5bfa84169..6ccd3a53f 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -946,7 +946,7 @@ static int interpret_nth_prior_checkout(const char *name, int namelen,
retval = 0;
if (0 < for_each_reflog_ent_reverse("HEAD", grab_nth_branch_switch, &cb)) {
strbuf_reset(buf);
- strbuf_add(buf, cb.buf.buf, cb.buf.len);
+ strbuf_addbuf(buf, &cb.buf);
retval = brace - name + 1;
}