Mercurial > hg
comparison rust/hg-core/src/revlog/index.rs @ 48198:61ce70fd420e
rhg: handle null changelog and manifest revisions
Differential Revision: https://phab.mercurial-scm.org/D11650
author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
---|---|
date | Tue, 12 Oct 2021 19:43:51 +0100 |
parents | 001d747c2baf |
children | 5e77bdc29d56 |
comparison
equal
deleted
inserted
replaced
48197:63e86fc9bfec | 48198:61ce70fd420e |
---|---|
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 /// Value of the inline flag. | 209 /// Value of the inline flag. |
210 pub fn is_inline(index_bytes: &[u8]) -> bool { | 210 pub fn is_inline(index_bytes: &[u8]) -> bool { |
211 if index_bytes.len() < 4 { | |
212 return true; | |
213 } | |
211 match &index_bytes[0..=1] { | 214 match &index_bytes[0..=1] { |
212 [0, 0] | [0, 2] => false, | 215 [0, 0] | [0, 2] => false, |
213 _ => true, | 216 _ => true, |
214 } | 217 } |
215 } | 218 } |