Re: [PATCH 01/10] commit-graph: introduce 'get_bloom_filter_settings()'
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Aug 4, 2020, 20:08 UTC
- Message-ID
- <20200804200849.GB89277@syl.lan>
- In-Reply-To
- <20200804072417.GA183951@coredump.intra.peff.net>
On Tue, Aug 04, 2020 at 03:24:17AM -0400, Jeff King wrote:
Show 18 quoted lines
> On Mon, Aug 03, 2020 at 02:57:09PM -0400, Taylor Blau wrote: > > > 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