]> git.ipfire.org Git - thirdparty/git.git/commit
reftable: avoid writing empty keys at the block layer
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 21 Feb 2022 18:46:07 +0000 (18:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Feb 2022 21:36:26 +0000 (13:36 -0800)
commit45c2fcc2a0659e42c7e4f21f0b97393df261ca51
tree310a0c84d44b04f2c04580588c51246d3a239df3
parent140765911050d62a23503972ef6513ef18252ad3
reftable: avoid writing empty keys at the block layer

The public interface (reftable_writer) already ensures that keys are
written in strictly increasing order, and an empty key by definition
fails this check.

However, by also enforcing this at the block layer, it is easier to
verify that records (which are written into blocks) never have to
consider the possibility of empty keys.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/block.c
reftable/block_test.c
reftable/writer.c