repository: make N=1 chunk size assumption explicit in list(), refs #8572

info.size is the on-disk pack file size, which equals the chunk size only
when N=1 (one chunk per pack).  Extract it into a named variable with a
comment so the assumption is visible and easy to fix when N>1 is introduced.
This commit is contained in:
Mrityunjay Raj 2026-06-01 23:56:40 +05:30
parent a4eac0b62c
commit d8564b90a4

View file

@ -467,7 +467,8 @@ class Repository:
pack_id = hex_to_bin(info.name)
chunk_id = pack_id # N=1: chunk_id == pack_id
if collect:
result.append((chunk_id, info.size))
chunk_size = info.size # only correct for N=1
result.append((chunk_id, chunk_size))
if len(result) == limit:
break
elif chunk_id == marker: