diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2017-12-05 16:50:14 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-05 09:44:37 -0800 |
commit | f4371a883fa2d740d6b3cd436f62c9b56f13432e (patch) | |
tree | 3d4adf06a24546df273175d6890c9fd8d9f457ba /builtin/rev-list.c | |
parent | 4875c9791e787af07992d3ba30061885322b7d11 (diff) | |
download | git-f4371a883fa2d740d6b3cd436f62c9b56f13432e.tar.gz |
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>
Diffstat (limited to 'builtin/rev-list.c')
-rw-r--r-- | builtin/rev-list.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c index 71e3dfc46e..159b035a2c 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -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; |