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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
>
> > 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux