提交 1c9eecff 编写于 作者: W Will Palmer 提交者: Junio C Hamano

diff-options: make --patch a synonym for -p

Here we simply make --patch a synonym for -p, whose mnemonic was "patch"
all along.
Signed-off-by: NWill Palmer <wmpalmer@gmail.com>
Reviewed-by: NJeff King <peff@peff.net>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 67687fea
......@@ -21,6 +21,7 @@ endif::git-format-patch[]
ifndef::git-format-patch[]
-p::
-u::
--patch::
Generate patch (see section on generating patches).
{git-diff? This is the default.}
endif::git-format-patch[]
......
......@@ -2701,7 +2701,7 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
const char *arg = av[0];
/* Output format options */
if (!strcmp(arg, "-p") || !strcmp(arg, "-u"))
if (!strcmp(arg, "-p") || !strcmp(arg, "-u") || !strcmp(arg, "--patch"))
options->output_format |= DIFF_FORMAT_PATCH;
else if (opt_arg(arg, 'U', "unified", &options->context))
options->output_format |= DIFF_FORMAT_PATCH;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册