]> git.ipfire.org Git - thirdparty/git.git/commitdiff
bloom.h: make `load_bloom_filter_from_graph()` public
authorTaylor Blau <me@ttaylorr.com>
Tue, 25 Jun 2024 17:39:41 +0000 (13:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 Jun 2024 20:52:05 +0000 (13:52 -0700)
Prepare for a future commit to use the load_bloom_filter_from_graph()
function directly to load specific Bloom filters out of the commit-graph
for manual inspection (to be used during tests).

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bloom.c
bloom.h

diff --git a/bloom.c b/bloom.c
index e529f7605ca14d3fcb779412fc22e1e20d45ac20..401999ed3c26238bb98835707523dbba2d2afde6 100644 (file)
--- a/bloom.c
+++ b/bloom.c
@@ -48,9 +48,9 @@ static int check_bloom_offset(struct commit_graph *g, uint32_t pos,
        return -1;
 }
 
-static int load_bloom_filter_from_graph(struct commit_graph *g,
-                                       struct bloom_filter *filter,
-                                       uint32_t graph_pos)
+int load_bloom_filter_from_graph(struct commit_graph *g,
+                                struct bloom_filter *filter,
+                                uint32_t graph_pos)
 {
        uint32_t lex_pos, start_index, end_index;
 
diff --git a/bloom.h b/bloom.h
index adde6dfe21254f7022051fd6d3c19b722b34f54e..1e4f612d2c203b5e507f871c523675477fa4e41b 100644 (file)
--- a/bloom.h
+++ b/bloom.h
@@ -3,6 +3,7 @@
 
 struct commit;
 struct repository;
+struct commit_graph;
 
 struct bloom_filter_settings {
        /*
@@ -68,6 +69,10 @@ struct bloom_key {
        uint32_t *hashes;
 };
 
+int load_bloom_filter_from_graph(struct commit_graph *g,
+                                struct bloom_filter *filter,
+                                uint32_t graph_pos);
+
 /*
  * Calculate the murmur3 32-bit hash value for the given data
  * using the given seed.