]> git.ipfire.org Git - thirdparty/git.git/commit
refs/reftable: add fsck check for checking the table name
authorKarthik Nayak <karthik.188@gmail.com>
Tue, 7 Oct 2025 12:11:31 +0000 (14:11 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Oct 2025 16:22:58 +0000 (09:22 -0700)
commit466a3a1afdd82bb2b0e24e5cbed1ff3b35c19abd
tree44e096c9d7908d8edc28aeef09a44c347dfb470d
parent9051638519e7f9d52ce87d1baa88b35141f073aa
refs/reftable: add fsck check for checking the table name

Add glue code in 'refs/reftable-backend.c' which calls the reftable
library to perform the fsck checks. Here we also map the reftable errors
to Git' fsck errors.

Introduce a check to validate table names for a given reftable stack.
Also add 'badReftableTableName' as a corresponding error within Git. The
reftable specification mentions:

  It suggested to use
  ${min_update_index}-${max_update_index}-${random}.ref as a naming
  convention.

So treat non-conformant file names as warnings.

While adding the fsck header to 'refs/reftable-backend.c', modify the
list to maintain lexicographical ordering.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/fsck-msgids.adoc
fsck.h
refs/reftable-backend.c
t/meson.build
t/t0614-reftable-fsck.sh [new file with mode: 0755]