git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/4] pack-bitmap: write lookup table extension by default

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 17, 2025, 22:04 UTC
Message-ID
<xmqqmscee97z.fsf@gitster.g>
In-Reply-To
<b7cfb1267fdd7f50f414c9f79377cb338a0c1ab0.1744924321.git.me@ttaylorr.com>
Taylor Blau <me@ttaylorr.com> writes:
Show 22 quoted lines
> diff --git a/builtin/multi-pack-index.c b/builtin/multi-pack-index.c
> index 2a938466f5..6ad6f814e3 100644
> --- a/builtin/multi-pack-index.c
> +++ b/builtin/multi-pack-index.c
> @@ -142,6 +142,7 @@ static int cmd_multi_pack_index_write(int argc, const char **argv,
>  	int ret;
>  
>  	opts.flags |= MIDX_WRITE_BITMAP_HASH_CACHE;
> +	opts.flags |= MIDX_WRITE_BITMAP_LOOKUP_TABLE;
>  
>  	git_config(git_multi_pack_index_write_config, NULL);
>  
> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
> index 3973267e9e..384fefbb1d 100644
> --- a/builtin/pack-objects.c
> +++ b/builtin/pack-objects.c
> @@ -239,7 +239,7 @@ static enum {
>  	WRITE_BITMAP_QUIET,
>  	WRITE_BITMAP_TRUE,
>  } write_bitmap_index;
> -static uint16_t write_bitmap_options = BITMAP_OPT_HASH_CACHE;
> +static uint16_t write_bitmap_options = BITMAP_OPT_HASH_CACHE | BITMAP_OPT_LOOKUP_TABLE;
Are these two hunks required to be kept in sync?

If so, I am wondering what is the right approach to make sure they are. The definition of MIDX_WRITE_BITMAP_* flag bits in midx.h and BITMAP_OPT_* flag bits in write_bitmap_index enum are distinct two sets, and we need a way to somehow convert between them back and forth if we really wanted to ensure that these "default" values are kept in sync automatically.

The reason I ask is mostly because I do not know offhand, and I would imagine that it would be hard for third-parties to verify, if these are only two places that need to be updated in order for lookup table extensions to be written by default, when somebody new wants to further update the default.

Previous: Taylor BlauNext: Jeff King
Message 3 of 18 in “pack-bitmap: enable lookup tables by default, misc. cleanups”
  1. 0/4 pack-bitmap: enable lookup tables by default, misc. cleanupsTaylor Blau, Apr 17, 2025
  2. 1/4 pack-bitmap: write lookup table extension by defaultTaylor Blau, Apr 17, 2025
  3. Junio C HamanoApr 17, 2025
  4. Jeff KingApr 18, 2025
  5. Junio C HamanoApr 18, 2025
  6. Taylor BlauApr 18, 2025
  7. 2/4 p5312: removed duplicate performance test scriptTaylor Blau, Apr 17, 2025
  8. Junio C HamanoApr 17, 2025
  9. Taylor BlauApr 18, 2025
  10. 3/4 t/perf: avoid testing bitmaps without lookup tableTaylor Blau, Apr 17, 2025
  11. Junio C HamanoApr 17, 2025
  12. Junio C HamanoApr 18, 2025
  13. Jeff KingApr 18, 2025
  14. 4/4 t/perf/lib-bitmap.sh: avoid test_perf during setupTaylor Blau, Apr 17, 2025
  15. Junio C HamanoApr 17, 2025
  16. Jeff KingApr 18, 2025
  17. Junio C HamanoMay 2, 2025
  18. Patrick SteinhardtMay 5, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.