diff rust/hg-core/src/dirstate_tree/dirstate_map.rs @ 47409:0ef8231e413f

dirstate-v2: Store a hash of ignore patterns (.hgignore) Later, this help extend `read_dir` caching to directories that contain ignored files (but no unknown files). Such cache must be invalidated when ignore patterns change since a formerly-ignored file might become unknown. This helps the default configuration of `hg status` where unknown files must be listed, but ignored files are not. Differential Revision: https://phab.mercurial-scm.org/D10836
author Simon Sapin <simon.sapin@octobus.net>
date Wed, 02 Jun 2021 11:25:18 +0200
parents 9d58e54b5966
children c657beacdf2e
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs	Mon Jun 07 17:29:32 2021 +0530
+++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs	Wed Jun 02 11:25:18 2021 +0200
@@ -37,6 +37,9 @@
     /// Number of nodes anywhere in the tree that have
     /// `.copy_source.is_some()`.
     pub(super) nodes_with_copy_source_count: u32,
+
+    /// See on_disk::Header
+    pub(super) ignore_patterns_hash: on_disk::IgnorePatternsHash,
 }
 
 /// Using a plain `HgPathBuf` of the full path from the repository root as a
@@ -385,6 +388,7 @@
             root: ChildNodes::default(),
             nodes_with_entry_count: 0,
             nodes_with_copy_source_count: 0,
+            ignore_patterns_hash: [0; on_disk::IGNORE_PATTERNS_HASH_LEN],
         }
     }