diff -r 09a54892b7ee -r 88aa21d654e5 rust/hg-core/src/repo.rs --- a/rust/hg-core/src/repo.rs Wed Aug 21 09:48:14 2024 +0200 +++ b/rust/hg-core/src/repo.rs Mon Sep 30 17:43:51 2024 +0200 @@ -342,7 +342,6 @@ let identity = self.dirstate_identity()?; let dirstate = self.dirstate_file_contents()?; if dirstate.is_empty() { - self.dirstate_parents.set(DirstateParents::NULL); Ok((identity, None, 0)) } else { let docket_res = @@ -427,7 +426,7 @@ let dirstate_file_contents = self.dirstate_file_contents()?; if dirstate_file_contents.is_empty() { self.dirstate_parents.set(DirstateParents::NULL); - Ok(OwningDirstateMap::new_empty(Vec::new())) + Ok(OwningDirstateMap::new_empty(Vec::new(), identity)) } else { let (map, parents) = OwningDirstateMap::new_v1(dirstate_file_contents, identity)?; @@ -443,8 +442,7 @@ let dirstate_file_contents = self.dirstate_file_contents()?; let identity = self.dirstate_identity()?; if dirstate_file_contents.is_empty() { - self.dirstate_parents.set(DirstateParents::NULL); - return Ok(OwningDirstateMap::new_empty(Vec::new())); + return Ok(OwningDirstateMap::new_empty(Vec::new(), identity)); } let docket = crate::dirstate_tree::on_disk::read_docket( &dirstate_file_contents,