Re: [PATCH 3/4] midx.c: respect 'pack.writeBitmapHashcache' when writing bitmaps
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Sep 14, 2021, 01:15 UTC
- Message-ID
- <YT/3mEv9OnC/CH67@nand.local>
- In-Reply-To
- <xmqqee9tia2b.fsf@gitster.g>
On Sun, Sep 12, 2021 at 05:38:36PM -0700, Junio C Hamano wrote:
Show 19 quoted lines
> Taylor Blau <me@ttaylorr.com> writes:
>
> > +static int git_multi_pack_index_write_config(const char *var, const char *value,
> > + void *cb)
> > +{
> > + if (!strcmp(var, "pack.writebitmaphashcache")) {
> > + if (git_config_bool(var, value))
> > + opts.flags |= MIDX_WRITE_BITMAP_HASH_CACHE;
> > + else
> > + opts.flags &= ~MIDX_WRITE_BITMAP_HASH_CACHE;
> > + }
> > +
> > + /*
> > + * No need to fall-back to 'git_default_config', since this was already
> > + * called in 'cmd_multi_pack_index()'.
> > + */
>
> It's probably not just "No need to", but calling default_config() or
> any "more generic" config this late is a wrong pattern [...]Makes sense to me, will apply. Thanks!
Thanks, Taylor