]> git.ipfire.org Git - thirdparty/git.git/commit
reftable: implement refname validation
authorHan-Wen Nienhuys <hanwen@google.com>
Thu, 7 Oct 2021 20:25:12 +0000 (20:25 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Oct 2021 17:45:48 +0000 (10:45 -0700)
commitacb533440fc0ed32e195987b9946e948a9706560
tree5d15160dab669d0e7ddcf1b07cee068816b0eaae
parent1ae2b8cda84c4c662d8f60898e034d9643f097b6
reftable: implement refname validation

The packed/loose format has restrictions on refnames: a and a/b cannot
coexist. This limitation does not apply to reftable per se, but must be
maintained for interoperability. This code adds validation routines to
abort transactions that are trying to add invalid names.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
reftable/refname.c [new file with mode: 0644]
reftable/refname.h [new file with mode: 0644]
reftable/refname_test.c [new file with mode: 0644]
t/helper/test-reftable.c