]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'tb/multi-pack-bitmaps'
authorJunio C Hamano <gitster@pobox.com>
Mon, 20 Sep 2021 22:20:39 +0000 (15:20 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Sep 2021 22:20:39 +0000 (15:20 -0700)
The reachability bitmap file used to be generated only for a single
pack, but now we've learned to generate bitmaps for history that
span across multiple packfiles.

* tb/multi-pack-bitmaps: (29 commits)
  pack-bitmap: drop bitmap_index argument from try_partial_reuse()
  pack-bitmap: drop repository argument from prepare_midx_bitmap_git()
  p5326: perf tests for MIDX bitmaps
  p5310: extract full and partial bitmap tests
  midx: respect 'GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP'
  t7700: update to work with MIDX bitmap test knob
  t5319: don't write MIDX bitmaps in t5319
  t5310: disable GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP
  t0410: disable GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP
  t5326: test multi-pack bitmap behavior
  t/helper/test-read-midx.c: add --checksum mode
  t5310: move some tests to lib-bitmap.sh
  pack-bitmap: write multi-pack bitmaps
  pack-bitmap: read multi-pack bitmaps
  pack-bitmap.c: avoid redundant calls to try_partial_reuse
  pack-bitmap.c: introduce 'bitmap_is_preferred_refname()'
  pack-bitmap.c: introduce 'nth_bitmap_object_oid()'
  pack-bitmap.c: introduce 'bitmap_num_objects()'
  midx: avoid opening multiple MIDXs when writing
  midx: close linked MIDXs, avoid leaking memory
  ...

1  2 
builtin/commit-graph.c
builtin/multi-pack-index.c
builtin/pack-objects.c
ci/run-build-and-tests.sh
object-store.h
packfile.c
t/README

index 21fc6e934b0e5483aa198cfa2569816db98923dc,003eaaac5cfebc448dca184dde6183740237fdf2..0386f5c7755901aeb33ca41ade143a98d8a78ec7
@@@ -46,42 -43,6 +46,20 @@@ static struct opts_commit_graph 
        int enable_changed_paths;
  } opts;
  
- static struct object_directory *find_odb(struct repository *r,
-                                        const char *obj_dir)
- {
-       struct object_directory *odb;
-       char *obj_dir_real = real_pathdup(obj_dir, 1);
-       struct strbuf odb_path_real = STRBUF_INIT;
-       prepare_alt_odb(r);
-       for (odb = r->objects->odb; odb; odb = odb->next) {
-               strbuf_realpath(&odb_path_real, odb->path, 1);
-               if (!strcmp(obj_dir_real, odb_path_real.buf))
-                       break;
-       }
-       free(obj_dir_real);
-       strbuf_release(&odb_path_real);
-       if (!odb)
-               die(_("could not find object directory matching %s"), obj_dir);
-       return odb;
- }
 +static struct option common_opts[] = {
 +      OPT_STRING(0, "object-dir", &opts.obj_dir,
 +                 N_("dir"),
 +                 N_("the object directory to store the graph")),
 +      OPT_BOOL(0, "progress", &opts.progress,
 +               N_("force progress reporting")),
 +      OPT_END()
 +};
 +
 +static struct option *add_common_options(struct option *to)
 +{
 +      return parse_options_concat(common_opts, to);
 +}
 +
  static int graph_verify(int argc, const char **argv)
  {
        struct commit_graph *graph = NULL;
Simple merge
Simple merge
Simple merge
diff --cc object-store.h
Simple merge
diff --cc packfile.c
Simple merge
diff --cc t/README
Simple merge