Re: [PATCH 0/1] worktree: teach "add" to ignore submodule.recurse config
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 28, 2019, 02:26 UTC
- Message-ID
- <xmqqtv7ta9lz.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <pull.430.git.1572196585.gitgitgadget@gmail.com>
"Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 14 quoted lines
> 3. I'm on OS X 10.11.6 (Apple clang-800.0.42.1) and I get a warning
> compiling builtin/merge.c :
>
> > CC builtin/merge.o
> builtin/merge.c:831:33: warning: data argument not used by format string [-Wformat-extra-args]
> no_scissors_editor_comment), comment_line_char);
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
> builtin/merge.c:809:4: note: format string is defined here
> N_("An empty message aborts the commit.\n");
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./gettext.h:86:20: note: expanded from macro 'N_'
> #define N_(msgid) (msgid)
> ^~~~~
> 1 warning generated.I am not sure if the compiler needs fixing in this case, but the following may work it around.
builtin/merge.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c index e2ccbc44e2..0746f11df2 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -826,9 +826,12 @@ 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);