dirstate-v2: read the fallback value in Rust
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 19 Oct 2021 20:14:17 +0200
changeset 48265 3861e3f6ad54
parent 48264 bb240915f69f
child 48266 749946b6a641
dirstate-v2: read the fallback value in Rust This was overlooked in a previous commit. Differential Revision: https://phab.mercurial-scm.org/D11695
rust/hg-core/src/dirstate_tree/on_disk.rs
--- a/rust/hg-core/src/dirstate_tree/on_disk.rs	Tue Oct 19 18:18:05 2021 +0200
+++ b/rust/hg-core/src/dirstate_tree/on_disk.rs	Tue Oct 19 20:14:17 2021 +0200
@@ -379,14 +379,26 @@
         } else {
             None
         };
+        let fallback_exec = if self.flags().contains(Flags::HAS_FALLBACK_EXEC)
+        {
+            Some(self.flags().contains(Flags::FALLBACK_EXEC))
+        } else {
+            None
+        };
+        let fallback_symlink =
+            if self.flags().contains(Flags::HAS_FALLBACK_SYMLINK) {
+                Some(self.flags().contains(Flags::FALLBACK_SYMLINK))
+            } else {
+                None
+            };
         Ok(DirstateEntry::from_v2_data(
             wdir_tracked,
             p1_tracked,
             p2_info,
             mode_size,
             mtime,
-            None,
-            None,
+            fallback_exec,
+            fallback_symlink,
         ))
     }