]> git.ipfire.org Git - thirdparty/git.git/blobdiff - bloom.h
submodules: fix of regression on fetching of non-init subsub-repo
[thirdparty/git.git] / bloom.h
diff --git a/bloom.h b/bloom.h
index 0b9b59a6fea667fcc510dddb7d237e2383111c36..adde6dfe21254f7022051fd6d3c19b722b34f54e 100644 (file)
--- a/bloom.h
+++ b/bloom.h
@@ -89,9 +89,21 @@ void add_key_to_filter(const struct bloom_key *key,
 
 void init_bloom_filters(void);
 
-struct bloom_filter *get_bloom_filter(struct repository *r,
-                                     struct commit *c,
-                                     int compute_if_not_present);
+enum bloom_filter_computed {
+       BLOOM_NOT_COMPUTED = (1 << 0),
+       BLOOM_COMPUTED     = (1 << 1),
+       BLOOM_TRUNC_LARGE  = (1 << 2),
+       BLOOM_TRUNC_EMPTY  = (1 << 3),
+};
+
+struct bloom_filter *get_or_compute_bloom_filter(struct repository *r,
+                                                struct commit *c,
+                                                int compute_if_not_present,
+                                                const struct bloom_filter_settings *settings,
+                                                enum bloom_filter_computed *computed);
+
+#define get_bloom_filter(r, c) get_or_compute_bloom_filter( \
+       (r), (c), 0, NULL, NULL)
 
 int bloom_filter_contains(const struct bloom_filter *filter,
                          const struct bloom_key *key,