diff rust/hg-core/src/dirstate/entry.rs @ 48143:21542d4cb568

dirstate-item: introduce a `p1_tracked` property It is useful to simplify various conditional that use `any_tracked and not added`. Differential Revision: https://phab.mercurial-scm.org/D11586
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Oct 2021 04:07:21 +0200
parents fb3b41d583c2
children 6ac2b417d5d7
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/entry.rs	Fri Oct 01 04:04:09 2021 +0200
+++ b/rust/hg-core/src/dirstate/entry.rs	Fri Oct 01 04:07:21 2021 +0200
@@ -153,6 +153,10 @@
         self.flags.contains(Flags::WDIR_TRACKED)
     }
 
+    pub fn p1_tracked(&self) -> bool {
+        self.flags.contains(Flags::P1_TRACKED)
+    }
+
     fn in_either_parent(&self) -> bool {
         self.flags.intersects(Flags::P1_TRACKED | Flags::P2_INFO)
     }