# HG changeset patch # User Antoine cezar # Date 2020-09-28 11:51:16 # Node ID f38adf8b0711bb0ab7fdc0a9fce876549312818e # Parent 11f3c3f408fdc213a33c4d01a0556318e99f9f16 hg-core: Explain offset override of first revision (D8958#inline-14992 followup) Differential Revision: https://phab.mercurial-scm.org/D9095 diff --git a/rust/hg-core/src/revlog/index.rs b/rust/hg-core/src/revlog/index.rs --- a/rust/hg-core/src/revlog/index.rs +++ b/rust/hg-core/src/revlog/index.rs @@ -98,7 +98,8 @@ impl<'a> Index<'a> { let end = start + INDEX_ENTRY_SIZE; let bytes = &self.bytes[start..end]; - // See IndexEntry for an explanation of this override. + // Override the offset of the first revision as its bytes are used + // for the index's metadata (saving space because it is always 0) let offset_override = match rev { 0 => Some(0), _ => None,