Thread (2 messages) flat view 2 messages, 2 authors, 2021-09-14

Re: [PATCH 3/4] midx.c: respect 'pack.writeBitmapHashcache' when writing bitmaps

From: Taylor Blau <hidden>
Date: 2021-09-14 01:15:07

On Sun, Sep 12, 2021 at 05:38:36PM -0700, Junio C Hamano wrote:
Taylor Blau [off-list ref] writes:
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help