fetch-pack: add --no-filter
authorJeff Hostetler <jeffhost@microsoft.com>
Fri, 8 Dec 2017 15:58:41 +0000 (15:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Dec 2017 17:58:51 +0000 (09:58 -0800)
Fixup fetch-pack to accept --no-filter to be consistent with
rev-list and pack-objects.

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch-pack.c
index 795780763abf61f406e12959497c1d9c29663e00..cbf503537a9b88cda4137e34dd129aec97a3db82 100644 (file)
@@ -157,6 +157,10 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
                        parse_list_objects_filter(&args.filter_options, arg);
                        continue;
                }
+               if (!strcmp(arg, ("--no-" CL_ARG__FILTER))) {
+                       list_objects_filter_release(&args.filter_options);
+                       continue;
+               }
                usage(fetch_pack_usage);
        }
        if (deepen_not.nr)