reftable/stack: adjust permissions of compacted tables
commitb3a79dd4e97a76317b528437e7413452b285ee88
authorPatrick Steinhardt <ps@pks.im>
Fri, 26 Jan 2024 10:09:10 +0000 (26 11:09 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Jan 2024 16:21:44 +0000 (26 08:21 -0800)
tree2dc66af145b7a0243bddec7c4eaf4b9457bd876c
parente02ecfcc534e2021aae29077a958dd11c3897e4c
reftable/stack: adjust permissions of compacted tables

When creating a new compacted table from a range of preexisting ones we
don't set the default permissions on the resulting table when specified
by the user. This has the effect that the "core.sharedRepository" config
will not be honored correctly.

Fix this bug and add a test to catch this issue. Note that we only test
on non-Windows platforms because Windows does not use POSIX permissions
natively.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/stack.c
reftable/stack_test.c