Skip to content

Commit 00e302d

Browse files
carenasgitster
authored andcommitted
builtin/merge: avoid -Wformat-extra-args from ancient Xcode
d540b70 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1a2b985 commit 00e302d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

builtin/merge.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -830,9 +830,11 @@ static void prepare_to_commit(struct commit_list *remoteheads)
830830
strbuf_commented_addf(&msg, "\n");
831831
}
832832
strbuf_commented_addf(&msg, _(merge_editor_comment));
833-
strbuf_commented_addf(&msg, _(cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS ?
834-
scissors_editor_comment :
835-
no_scissors_editor_comment), comment_line_char);
833+
if (cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS)
834+
strbuf_commented_addf(&msg, _(scissors_editor_comment));
835+
else
836+
strbuf_commented_addf(&msg,
837+
_(no_scissors_editor_comment), comment_line_char);
836838
}
837839
if (signoff)
838840
append_signoff(&msg, ignore_non_trailer(msg.buf, msg.len), 0);

0 commit comments

Comments
 (0)