Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>2021-08-08 06:38:34 +0300
committerJunio C Hamano <gitster@pobox.com>2021-08-09 19:48:01 +0300
commit00e302da76591f2bda43d9bf58bf366729ee485c (patch)
tree61fe2eaae140b2f5ad54e45bf20e3b06eef053eb /builtin
parent1a2b985fb375e7ce14932bfc59365024af2fb6ab (diff)
builtin/merge: avoid -Wformat-extra-args from ancient Xcode
d540b70c85 (merge: cleanup messages like commit, 2019-04-17) adds a way to change part of the helper text using a single call to strbuf_add_commented_addf but with two formats with varying number of parameters. this trigger a warning in old versions of Xcode (ex 8.0), so use instead two independent calls with a matching number of parameters Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/merge.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index e96f72af80..bb52f33097 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -830,9 +830,11 @@ static void prepare_to_commit(struct commit_list *remoteheads)
strbuf_commented_addf(&msg, "\n");
}
strbuf_commented_addf(&msg, _(merge_editor_comment));
- strbuf_commented_addf(&msg, _(cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS ?
- scissors_editor_comment :
- no_scissors_editor_comment), comment_line_char);
+ if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS)
+ strbuf_commented_addf(&msg, _(scissors_editor_comment));
+ else
+ strbuf_commented_addf(&msg,
+ _(no_scissors_editor_comment), comment_line_char);
}
if (signoff)
append_signoff(&msg, ignore_non_trailer(msg.buf, msg.len), 0);