diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2017-12-08 15:58:50 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-08 17:58:52 (GMT) |
commit | aa57b871dad3cca07abead9a8d1fefceffe7578d (patch) | |
tree | eb45a434cb5a253a5c8bb3ed63b1f9c0910891e5 /list-objects-filter-options.h | |
parent | 35a7ae952ffee0d47d4f6302163488abea3bf418 (diff) | |
download | git-aa57b871dad3cca07abead9a8d1fefceffe7578d.zip git-aa57b871dad3cca07abead9a8d1fefceffe7578d.tar.gz git-aa57b871dad3cca07abead9a8d1fefceffe7578d.tar.bz2 |
fetch: inherit filter-spec from partial clone
Teach (partial) fetch to inherit the filter-spec used by
the partial clone. Extend --no-filter to override this
inheritance.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects-filter-options.h')
-rw-r--r-- | list-objects-filter-options.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/list-objects-filter-options.h b/list-objects-filter-options.h index 1143539..0000a61 100644 --- a/list-objects-filter-options.h +++ b/list-objects-filter-options.h @@ -31,6 +31,11 @@ struct list_objects_filter_options { enum list_objects_filter_choice choice; /* + * Choice is LOFC_DISABLED because "--no-filter" was requested. + */ + unsigned int no_filter : 1; + + /* * Parsed values (fields) from within the filter-spec. These are * choice-specific; not all values will be defined for any given * choice. @@ -58,6 +63,13 @@ int opt_parse_list_objects_filter(const struct option *opt, void list_objects_filter_release( struct list_objects_filter_options *filter_options); +static inline void list_objects_filter_set_no_filter( + struct list_objects_filter_options *filter_options) +{ + list_objects_filter_release(filter_options); + filter_options->no_filter = 1; +} + void partial_clone_register( const char *remote, const struct list_objects_filter_options *filter_options); |