From 466a3a1afdd82bb2b0e24e5cbed1ff3b35c19abd Mon Sep 17 00:00:00 2001 From: Karthik Nayak Date: Tue, 7 Oct 2025 14:11:31 +0200 Subject: 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 Signed-off-by: Junio C Hamano --- fsck.h | 1 + 1 file changed, 1 insertion(+) (limited to 'fsck.h') diff --git a/fsck.h b/fsck.h index 6b0db235e0..759df97655 100644 --- a/fsck.h +++ b/fsck.h @@ -73,6 +73,7 @@ enum fsck_msg_type { FUNC(UNKNOWN_TYPE, ERROR) \ FUNC(ZERO_PADDED_DATE, ERROR) \ /* warnings */ \ + FUNC(BAD_REFTABLE_TABLE_NAME, WARN) \ FUNC(EMPTY_NAME, WARN) \ FUNC(FULL_PATHNAME, WARN) \ FUNC(HAS_DOT, WARN) \ -- cgit v1.3