diff mbox series

[2/4] bloom.h: make `load_bloom_filter_from_graph()` public

Message ID cc56e0afda2ea8ad501d58d207ce94f802342efa.1689789226.git.me@ttaylorr.com (mailing list archive)
State Accepted
Commit 739b46a89f3ecc850ded5cc4989cb7c5082d1a5e
Headers show
Series commit-graph: avoid looking at Bloom filter data directly | expand

Commit Message

Taylor Blau July 19, 2023, 5:55 p.m. UTC
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>
---
 bloom.c | 6 +++---
 bloom.h | 5 +++++
 2 files changed, 8 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/bloom.c b/bloom.c
index aef6b5fea2d..3e78cfe79d4 100644
--- a/bloom.c
+++ b/bloom.c
@@ -29,9 +29,9 @@  static inline unsigned char get_bitmask(uint32_t pos)
 	return ((unsigned char)1) << (pos & (BITS_PER_WORD - 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 adde6dfe212..1e4f612d2c2 100644
--- 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.