diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-12 13:51:23 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-12 13:51:23 -0700 |
commit | 6a0699bccc03e83b90ace5d170686d3c28e7237f (patch) | |
tree | 24d473c4c17486b5725fd320c116da887fc9a5f4 | |
parent | Merge branch 'js/log-protocol-version' into maint (diff) | |
parent | builtin/merge: avoid -Wformat-extra-args from ancient Xcode (diff) | |
download | tgif-6a0699bccc03e83b90ace5d170686d3c28e7237f.tar.xz |
Merge branch 'cb/builtin-merge-format-string-fix' into maint
Code clean-up.
* cb/builtin-merge-format-string-fix:
builtin/merge: avoid -Wformat-extra-args from ancient Xcode
-rw-r--r-- | builtin/merge.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/merge.c b/builtin/merge.c index a3282bf0e8..097a74b139 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -862,9 +862,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); |