diff -r 5ae05937b98f -r 98910135a3bc mercurial/revlog.py --- a/mercurial/revlog.py Tue Oct 31 22:42:46 2023 -0700 +++ b/mercurial/revlog.py Mon Nov 06 17:12:04 2023 +0100 @@ -1279,6 +1279,9 @@ @staticmethod def is_inline_index(header_bytes): """Determine if a revlog is inline from the initial bytes of the index""" + if len(header_bytes) == 0: + return True + header = INDEX_HEADER.unpack(header_bytes)[0] _format_flags = header & ~0xFFFF