summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2017-10-01 16:44:20 +0200
committerJunio C Hamano <gitster@pobox.com>2017-10-02 13:13:46 +0900
commit72d4a9a721d519982cbc97c36f3fcf33b4103ed4 (patch)
tree5e59453cd9615b9d6b92dbccf88362497dce49db /builtin
parentfa2bb34477120f18d0834a545ac777e6295650d2 (diff)
downloadgit-72d4a9a721d519982cbc97c36f3fcf33b4103ed4.tar.gz
use strbuf_addstr() for adding strings to strbufs
Use strbuf_addstr() instead of strbuf_addf() for adding strings. That's simpler and makes the intent clearer. Patch generated by Coccinelle and contrib/coccinelle/strbuf.cocci; adjusted indentation in refs/packed-backend.c manually. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/branch.c b/builtin/branch.c
index 355f9ef5da..a2b7c55427 100644
--- a/builtin/branch.c
+++ b/builtin/branch.c
@@ -352,7 +352,7 @@ static char *build_format(struct ref_filter *filter, int maxwidth, const char *r
strbuf_addf(&obname, "%%(objectname:short=%d)", filter->abbrev);
strbuf_addf(&local, "%%(align:%d,left)%%(refname:lstrip=2)%%(end)", maxwidth);
- strbuf_addf(&local, "%s", branch_get_color(BRANCH_COLOR_RESET));
+ strbuf_addstr(&local, branch_get_color(BRANCH_COLOR_RESET));
strbuf_addf(&local, " %s ", obname.buf);
if (filter->verbose > 1)