Commit 4875c979 authored by Jeff Hostetler's avatar Jeff Hostetler Committed by Junio C Hamano

list-objects-filter-options: support --no-filter

Teach opt_parse_list_objects_filter() to take --no-filter
option and to free the contents of struct filter_options.
This command line argument will be automatically inherited
by commands using OPT_PARSE_LIST_OBJECTS_FILTER(); this
includes pack-objects.
Signed-off-by: default avatarJeff Hostetler <>
Signed-off-by: default avatarJunio C Hamano <>
parent 1dde5fa2
......@@ -242,6 +242,9 @@ So does `git bundle` (see linkgit:git-bundle[1]) when it creates a bundle.
the resulting packfile. See linkgit:git-rev-list[1] for valid
`<filter-spec>` forms.
Turns off any previous `--filter=` argument.
A debug option to help with future "partial clone" development.
This option specifies how missing objects are handled.
......@@ -74,8 +74,19 @@ int opt_parse_list_objects_filter(const struct option *opt,
struct list_objects_filter_options *filter_options = opt->value;
if (unset || !arg) {
return 0;
return parse_list_objects_filter(filter_options, arg);
void list_objects_filter_release(
struct list_objects_filter_options *filter_options)
memset(filter_options, 0, sizeof(*filter_options));
......@@ -52,7 +52,10 @@ int opt_parse_list_objects_filter(const struct option *opt,
{ OPTION_CALLBACK, 0, CL_ARG__FILTER, fo, N_("args"), \
N_("object filtering"), PARSE_OPT_NONEG, \
N_("object filtering"), 0, \
opt_parse_list_objects_filter }
void list_objects_filter_release(
struct list_objects_filter_options *filter_options);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment