changeset 45591:f38adf8b0711

hg-core: Explain offset override of first revision (D8958#inline-14992 followup) Differential Revision: https://phab.mercurial-scm.org/D9095
author Antoine cezar<acezar@chwitlabs.fr>
date Mon, 28 Sep 2020 13:51:16 +0200
parents 11f3c3f408fd
children a886ffd2ffc6
files rust/hg-core/src/revlog/index.rs
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/index.rs	Mon Sep 28 13:46:14 2020 +0200
+++ b/rust/hg-core/src/revlog/index.rs	Mon Sep 28 13:51:16 2020 +0200
@@ -98,7 +98,8 @@
         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,