rev-list: support --no-filter argument

Teach rev-list to support --no-filter to override a
previous --filter=<filter_spec> argument.  This is
to be consistent with commands that use OPT_PARSE
macros.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff Hostetler
2017-12-05 16:50:14 +00:00
committed by Junio C Hamano
parent 4875c9791e
commit f4371a883f
2 changed files with 14 additions and 5 deletions

View File

@ -403,6 +403,10 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
filter_options.filter_spec);
continue;
}
if (!strcmp(arg, ("--no-" CL_ARG__FILTER))) {
list_objects_filter_release(&filter_options);
continue;
}
if (!strcmp(arg, "--filter-print-omitted")) {
arg_print_omitted = 1;
continue;