Thread (99 messages) 99 messages, 5 authors, 2020-09-04

Re: [PATCH 01/10] commit-graph: introduce 'get_bloom_filter_settings()'

flat view

From: Taylor Blau <hidden>
Date: 2020-08-04 20:08:55

On Tue, Aug 04, 2020 at 03:24:17AM -0400, Jeff King wrote:
On Mon, Aug 03, 2020 at 02:57:09PM -0400, Taylor Blau wrote:
quoted
diff --git a/revision.c b/revision.c
index 6de29cdf7a..e244beed05 100644
--- a/revision.c
+++ b/revision.c
@@ -684,7 +684,7 @@ static void prepare_to_use_bloom_filter(struct rev_info *revs)
 	if (!revs->repo->objects->commit_graph)
 		return;

-	revs->bloom_filter_settings = revs->repo->objects->commit_graph->bloom_filter_settings;
+	revs->bloom_filter_settings = get_bloom_filter_settings(revs->repo);
 	if (!revs->bloom_filter_settings)
 		return;
I think you could get rid of the revs->repo->objects->commit_graph check
above now, as get_bloom_filter_settings() would return NULL if there is
no commit_graph at all.
Yep, that's right -- and good catch. This used to not be the case (or if
it was, relying on it was more fragile) when
'get_bloom_filter_settings()' took a commit-graph instead of a
repository, but now it's no longer necessary.

Thanks.
-Peff
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help