diff options
author | René Scharfe <l.s.r@web.de> | 2016-09-27 21:08:21 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-27 14:02:40 -0700 |
commit | 92d52fab3af8b1d5231285ac13b364f008d1a886 (patch) | |
tree | d7f4350b084aee1109cb4fe328b2892a16026e34 /builtin | |
parent | gitignore: ignore output files of coccicheck make target (diff) | |
download | tgif-92d52fab3af8b1d5231285ac13b364f008d1a886.tar.xz |
use strbuf_addstr() instead of strbuf_addf() with "%s", part 2
Replace uses of strbuf_addf() for adding strings with more lightweight
strbuf_addstr() calls. This is shorter and makes the intent clearer.
bc57b9c0cc5a123365a922fa1831177e3fd607ed already converted three cases,
this patch covers two 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')
-rw-r--r-- | builtin/submodule--helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 8807539115..dbe5699fe6 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -637,7 +637,7 @@ static int prepare_to_clone_next_submodule(const struct cache_entry *ce, if (suc->recursive_prefix) strbuf_addf(&sb, "%s/%s", suc->recursive_prefix, ce->name); else - strbuf_addf(&sb, "%s", ce->name); + strbuf_addstr(&sb, ce->name); strbuf_addf(out, _("Skipping unmerged submodule %s"), sb.buf); strbuf_addch(out, '\n'); goto cleanup; |