Comments
Patch
@@ -99,14 +99,18 @@
Some(Box::new(data_mmap))
};
- let nodemap = NodeMapDocket::read_from_file(repo, index_path)?.map(
- |(docket, data)| {
- nodemap::NodeTree::load_bytes(
- Box::new(data),
- docket.data_length,
- )
- },
- );
+ let nodemap = if index.is_inline() {
+ None
+ } else {
+ NodeMapDocket::read_from_file(repo, index_path)?.map(
+ |(docket, data)| {
+ nodemap::NodeTree::load_bytes(
+ Box::new(data),
+ docket.data_length,
+ )
+ },
+ )
+ };
Ok(Revlog {
index,
@@ -57,7 +57,7 @@
/// Value of the inline flag.
pub fn is_inline(&self) -> bool {
- is_inline(&self.bytes)
+ self.offsets.is_some()
}
/// Return a slice of bytes if `revlog` is inline. Panic if not.