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

Re: [PATCH] midx: disable replace objects

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 7, 2024, 18:04 UTC
Message-ID
<ZhLgLhv4LRcYrm7X@nand.local>
In-Reply-To
<ZhLfqU9VNUW+2mmV@nand.local>
On Sun, Apr 07, 2024 at 02:02:17PM -0400, Taylor Blau wrote:
Show 25 quoted lines
> It is tempting to instead do something like:
>
> --- 8< ---
> diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
> index c6c8f94cc5..cbc543caad 100644
> --- a/pack-bitmap-write.c
> +++ b/pack-bitmap-write.c
> @@ -17,6 +17,7 @@
>  #include "trace2.h"
>  #include "tree.h"
>  #include "tree-walk.h"
> +#include "replace-object.h"
>
>  struct bitmapped_commit {
>  	struct commit *commit;
> @@ -223,6 +224,8 @@ static void bitmap_builder_init(struct bitmap_builder *bb,
>  	memset(bb, 0, sizeof(*bb));
>  	init_bb_data(&bb->data);
>
> +	parsed_object_pool_clear(the_repository->parsed_objects);
> +
>  	reset_revision_walk();
>  	repo_init_revisions(writer->to_pack->repo, &revs, NULL);
>  	revs.topo_order = 1;
> --- >8 ---

Oops. I meant to attach a diff here that calls disable_replace_refs(), not parsed_object_pool_clear().

> But by then it is too late, because the replace refs have already been
> taken into account for parsed objects.

Thanks, Taylor

Previous: Taylor BlauNext: 鑫邢
Message 4 of 9 in “midx: disable replace objects”
  1. midx: disable replace objectsblanet via GitGitGadget, Apr 7, 2024
  2. Taylor BlauApr 7, 2024
  3. Taylor BlauApr 7, 2024
  4. Taylor BlauApr 7, 2024
  5. 鑫邢Apr 8, 2024
  6. midx: disable replace objectsblanet via GitGitGadget, Apr 8, 2024
  7. Junio C HamanoApr 17, 2024
  8. Taylor BlauApr 18, 2024
  9. Junio C HamanoApr 18, 2024

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.