]> git.ipfire.org Git - thirdparty/git.git/commit
reftable: ensure that obj_id_len is >= 2 on writing
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 21 Feb 2022 18:46:08 +0000 (18:46 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Feb 2022 21:36:26 +0000 (13:36 -0800)
commitb4007fcc6fe04deeeb3cdf7b018413f65c9de6e8
treea7b8e751d99cd417e83ce169aeeedaf74903adbc
parent45c2fcc2a0659e42c7e4f21f0b97393df261ca51
reftable: ensure that obj_id_len is >= 2 on writing

When writing the same hash many times, we might decide to use a
length-1 object ID prefix for the ObjectID => ref table, which is out
of spec.

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