diff-parseopt: convert --quiet

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 Mar 5, 2019 at 19:30 UTC 9bbaf1ce3447a06b3ba58ae1f70868bcd17b5b6a
1 file changed +3 -3
diff.c
+3 -3
@@ -5299,6 +5299,8 @@ static void prep_parse_options(struct diff_options *options)
5299 N_("swap two inputs, reverse the diff")),
5300 OPT_BOOL(0, "exit-code", &options->flags.exit_with_status,
5301 N_("exit with 1 if there were differences, 0 otherwise")),
5302 + OPT_BOOL(0, "quiet", &options->flags.quick,
5303 + N_("disable all output of the program")),
5304 { OPTION_CALLBACK, 0, "output", options, N_("<file>"),
5305 N_("Output to a specific file"),
5306 PARSE_OPT_NONEG, NULL, 0, diff_opt_output },
@@ -5348,9 +5350,7 @@ int diff_opt_parse(struct diff_options *options,
5350 if (cm & COLOR_MOVED_WS_ERROR)
5351 return -1;
5352 options->color_moved_ws_handling = cm;
5351 - } else if (!strcmp(arg, "--quiet"))
5352 - options->flags.quick = 1;
5353 - else if (!strcmp(arg, "--ext-diff"))
5353 + } else if (!strcmp(arg, "--ext-diff"))
5354 options->flags.allow_external = 1;
5355 else if (!strcmp(arg, "--no-ext-diff"))
5356 options->flags.allow_external = 0;