]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jt/reftable-geometric-compaction'
authorJunio C Hamano <gitster@pobox.com>
Tue, 16 Apr 2024 21:50:30 +0000 (14:50 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Apr 2024 21:50:30 +0000 (14:50 -0700)
The strategy to compact multiple tables of reftables after many
operations accumulate many entries has been improved to avoid
accumulating too many tables uncollected.

* jt/reftable-geometric-compaction:
  reftable/stack: use geometric table compaction
  reftable/stack: add env to disable autocompaction
  reftable/stack: expose option to disable auto-compaction

1  2 
reftable/stack_test.c
t/t0610-reftable-basics.sh

Simple merge
index 238d4923c433b8e434db6c5eac2e552abc4270aa,8eec093788d3d6b11315c64d1e94d1d8e4e3deb2..178791e0862e7c746443e4f38b7971d41d669b95
@@@ -114,36 -112,7 +114,36 @@@ test_expect_reftable_perms () 
                        return 1
                done
        '
 -done
 +
 +      test_expect_success POSIXPERM "pack-refs: honors --shared=$shared with umask $umask" '
 +              test_when_finished "rm -rf repo" &&
 +              (
 +                      umask $umask &&
 +                      git init --shared=$shared repo &&
 +                      test_commit -C repo A &&
-                       test_line_count = 3 repo/.git/reftable/tables.list &&
++                      test_line_count = 2 repo/.git/reftable/tables.list &&
 +                      git -C repo pack-refs
 +              ) &&
 +              test_expect_perms "$expect" repo/.git/reftable/tables.list &&
 +              for table in repo/.git/reftable/*.ref
 +              do
 +                      test_expect_perms "$expect" "$table" ||
 +                      return 1
 +              done
 +      '
 +}
 +
 +test_expect_reftable_perms 002 umask "-rw-rw-r--"
 +test_expect_reftable_perms 022 umask "-rw-r--r--"
 +test_expect_reftable_perms 027 umask "-rw-r-----"
 +
 +test_expect_reftable_perms 002 group "-rw-rw-r--"
 +test_expect_reftable_perms 022 group "-rw-rw-r--"
 +test_expect_reftable_perms 027 group "-rw-rw----"
 +
 +test_expect_reftable_perms 002 world "-rw-rw-r--"
 +test_expect_reftable_perms 022 world "-rw-rw-r--"
 +test_expect_reftable_perms 027 world "-rw-rw-r--"
  
  test_expect_success 'clone: can clone reftable repository' '
        test_when_finished "rm -rf repo clone" &&