add: speed up cmd_add() by utilizing read_cache_preload()
[gitweb.git] / list-objects-filter-options.h
index eea44a1a51b7c41feba26a688f82f3c67b23667e..af64e5c66fc4a242f9cc534380a9b3e8f1e67d00 100644 (file)
@@ -10,6 +10,7 @@ enum list_objects_filter_choice {
        LOFC_DISABLED = 0,
        LOFC_BLOB_NONE,
        LOFC_BLOB_LIMIT,
+       LOFC_TREE_NONE,
        LOFC_SPARSE_OID,
        LOFC_SPARSE_PATH,
        LOFC__COUNT /* must be last */
@@ -30,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
@@ -58,4 +64,17 @@ 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);
+void partial_clone_get_default_filter_spec(
+       struct list_objects_filter_options *filter_options);
+
 #endif /* LIST_OBJECTS_FILTER_OPTIONS_H */