bloom.h: make load_bloom_filter_from_graph()
public
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>
This commit is contained in:

committed by
Junio C Hamano

parent
69f8e06a5c
commit
739b46a89f
6
bloom.c
6
bloom.c
@ -29,9 +29,9 @@ static inline unsigned char get_bitmask(uint32_t pos)
|
|||||||
return ((unsigned char)1) << (pos & (BITS_PER_WORD - 1));
|
return ((unsigned char)1) << (pos & (BITS_PER_WORD - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int load_bloom_filter_from_graph(struct commit_graph *g,
|
int load_bloom_filter_from_graph(struct commit_graph *g,
|
||||||
struct bloom_filter *filter,
|
struct bloom_filter *filter,
|
||||||
uint32_t graph_pos)
|
uint32_t graph_pos)
|
||||||
{
|
{
|
||||||
uint32_t lex_pos, start_index, end_index;
|
uint32_t lex_pos, start_index, end_index;
|
||||||
|
|
||||||
|
5
bloom.h
5
bloom.h
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
struct commit;
|
struct commit;
|
||||||
struct repository;
|
struct repository;
|
||||||
|
struct commit_graph;
|
||||||
|
|
||||||
struct bloom_filter_settings {
|
struct bloom_filter_settings {
|
||||||
/*
|
/*
|
||||||
@ -68,6 +69,10 @@ struct bloom_key {
|
|||||||
uint32_t *hashes;
|
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
|
* Calculate the murmur3 32-bit hash value for the given data
|
||||||
* using the given seed.
|
* using the given seed.
|
||||||
|
Reference in New Issue
Block a user