diff options
author | René Scharfe <l.s.r@web.de> | 2016-09-15 20:31:00 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-15 12:23:38 -0700 |
commit | a22ae753cb297cb8a1e3ae950ae4415190cd51d5 (patch) | |
tree | fca5ed773d854629968db249065e162d9ad61682 /merge-recursive.c | |
parent | 63f0a758a06f9af81717683185016275cb201190 (diff) | |
download | git-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 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index e34912683c..d2b191b8c6 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -206,7 +206,7 @@ static void output_commit_title(struct merge_options *o, struct commit *commit) find_unique_abbrev(commit->object.oid.hash, DEFAULT_ABBREV)); if (parse_commit(commit) != 0) - strbuf_addf(&o->obuf, _("(bad commit)\n")); + strbuf_addstr(&o->obuf, _("(bad commit)\n")); else { const char *title; const char *msg = get_commit_buffer(commit, NULL); |