diff-parseopt: convert --patch-with-raw

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Feb 16, 2019 at 18:36 UTC c659f30398fecdc3dbea1faeaf41e94c30d5da6f
1 file changed +5 -4
diff.c
+5 -4
@@ -4901,6 +4901,10 @@ static void prep_parse_options(struct diff_options *options)
4901 OPT_BIT_F(0, "raw", &options->output_format,
4902 N_("generate the diff in raw format"),
4903 DIFF_FORMAT_RAW, PARSE_OPT_NONEG),
4904 + OPT_BITOP(0, "patch-with-raw", &options->output_format,
4905 + N_("synonym for '-p --raw'"),
4906 + DIFF_FORMAT_PATCH | DIFF_FORMAT_RAW,
4907 + DIFF_FORMAT_NO_OUTPUT),
4908 OPT_END()
4909 };
4910
@@ -4929,10 +4933,7 @@ int diff_opt_parse(struct diff_options *options,
4933 return ac;
4934
4935 /* Output format options */
4932 - if (!strcmp(arg, "--patch-with-raw")) {
4933 - enable_patch_output(&options->output_format);
4934 - options->output_format |= DIFF_FORMAT_RAW;
4935 - } else if (!strcmp(arg, "--numstat"))
4936 + if (!strcmp(arg, "--numstat"))
4937 options->output_format |= DIFF_FORMAT_NUMSTAT;
4938 else if (!strcmp(arg, "--shortstat"))
4939 options->output_format |= DIFF_FORMAT_SHORTSTAT;