diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-07-06 22:09:13 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-07-06 22:09:14 -0700 |
| commit | d80bea479daa1d49a6b2332c4731e2647c896c29 (patch) | |
| tree | c847e5c1a66a9a9e72d3b4afb3dae893081a70ca /bloom.c | |
| parent | 0cc4dcacb323cfd1cfe6e6a750ecc86eb215180d (diff) | |
| parent | c752ad09c4ea479e8d54d08637cc0e5709723208 (diff) | |
| download | git-d80bea479daa1d49a6b2332c4731e2647c896c29.tar.gz | |
Merge branch 'ak/commit-graph-to-slab'
A few fields in "struct commit" that do not have to always be
present have been moved to commit slabs.
* ak/commit-graph-to-slab:
commit-graph: minimize commit_graph_data_slab access
commit: move members graph_pos, generation to a slab
commit-graph: introduce commit_graph_data_slab
object: drop parsed_object_pool->commit_count
Diffstat (limited to 'bloom.c')
| -rw-r--r-- | bloom.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -33,15 +33,16 @@ static int load_bloom_filter_from_graph(struct commit_graph *g, struct commit *c) { uint32_t lex_pos, start_index, end_index; + uint32_t graph_pos = commit_graph_position(c); - while (c->graph_pos < g->num_commits_in_base) + while (graph_pos < g->num_commits_in_base) g = g->base_graph; /* The commit graph commit 'c' lives in doesn't carry bloom filters. */ if (!g->chunk_bloom_indexes) return 0; - lex_pos = c->graph_pos - g->num_commits_in_base; + lex_pos = graph_pos - g->num_commits_in_base; end_index = get_be32(g->chunk_bloom_indexes + 4 * lex_pos); @@ -193,7 +194,7 @@ struct bloom_filter *get_bloom_filter(struct repository *r, if (!filter->data) { load_commit_graph_info(r, c); - if (c->graph_pos != COMMIT_NOT_FROM_GRAPH && + if (commit_graph_position(c) != COMMIT_NOT_FROM_GRAPH && r->objects->commit_graph->chunk_bloom_indexes) { if (load_bloom_filter_from_graph(r->objects->commit_graph, filter, c)) return filter; |
