From: Junio C Hamano Date: Wed, 7 Apr 2021 23:54:08 +0000 (-0700) Subject: Merge branch 'zh/commit-trailer' X-Git-Tag: v2.32.0-rc0~106 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68e15e0c231bfa50e254fc87d054649161a7e301;p=thirdparty%2Fgit.git Merge branch 'zh/commit-trailer' "git commit" learned "--trailer [=]" option; together with the interpret-trailers command, this will make it easier to support custom trailers. * zh/commit-trailer: commit: add --trailer option --- 68e15e0c231bfa50e254fc87d054649161a7e301 diff --cc builtin/commit.c index d513858218,4b06672bd0..55d50a8891 --- a/builtin/commit.c +++ b/builtin/commit.c @@@ -1589,13 -1525,10 +1610,14 @@@ int cmd_commit(int argc, const char **a OPT_CALLBACK('m', "message", &message, N_("message"), N_("commit message"), opt_parse_m), OPT_STRING('c', "reedit-message", &edit_message, N_("commit"), N_("reuse and edit message from specified commit")), OPT_STRING('C', "reuse-message", &use_message, N_("commit"), N_("reuse message from specified commit")), - OPT_STRING(0, "fixup", &fixup_message, N_("commit"), N_("use autosquash formatted message to fixup specified commit")), + /* + * TRANSLATORS: Leave "[(amend|reword):]" as-is, + * and only translate . + */ + OPT_STRING(0, "fixup", &fixup_message, N_("[(amend|reword):]commit"), N_("use autosquash formatted message to fixup or amend/reword specified commit")), OPT_STRING(0, "squash", &squash_message, N_("commit"), N_("use autosquash formatted message to squash specified commit")), OPT_BOOL(0, "reset-author", &renew_authorship, N_("the commit is authored by me now (used with -C/-c/--amend)")), + OPT_CALLBACK_F(0, "trailer", NULL, N_("trailer"), N_("add custom trailer(s)"), PARSE_OPT_NONEG, opt_pass_trailer), OPT_BOOL('s', "signoff", &signoff, N_("add a Signed-off-by trailer")), OPT_FILENAME('t', "template", &template_file, N_("use specified template file")), OPT_BOOL('e', "edit", &edit_flag, N_("force edit of commit")),