summaryrefslogtreecommitdiff
path: root/builtin/submodule--helper.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2016-09-15 20:31:00 +0200
committerJunio C Hamano <gitster@pobox.com>2016-09-15 12:23:38 -0700
commita22ae753cb297cb8a1e3ae950ae4415190cd51d5 (patch)
treefca5ed773d854629968db249065e162d9ad61682 /builtin/submodule--helper.c
parent63f0a758a06f9af81717683185016275cb201190 (diff)
downloadgit-a22ae753cb297cb8a1e3ae950ae4415190cd51d5.tar.gz
use strbuf_addstr() for adding constant strings to a strbuf, part 2
Replace uses of strbuf_addf() for adding strings with more lightweight strbuf_addstr() calls. This makes the intent clearer and avoids potential issues with printf format specifiers. 02962d36845b89145cd69f8bc65e015d78ae3434 already converted six cases, this patch covers eleven more. A semantic patch for Coccinelle is included for easier checking for new cases that might be introduced in the future. Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r--builtin/submodule--helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index e79790f0bd..8807539115 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -749,8 +749,9 @@ static int update_clone_get_next_task(struct child_process *child,
ce = suc->failed_clones[index];
if (!prepare_to_clone_next_submodule(ce, child, suc, err)) {
suc->current ++;
- strbuf_addf(err, "BUG: submodule considered for cloning,"
- "doesn't need cloning any more?\n");
+ strbuf_addstr(err, "BUG: submodule considered for "
+ "cloning, doesn't need cloning "
+ "any more?\n");
return 0;
}
p = xmalloc(sizeof(*p));