diff rust/hg-core/src/dirstate/entry.rs @ 48066:7a2de2bd9fcd

dirstate: inline the `from_p2_removed` logic It is used internally for compatibilty with size used in the `v1` format, but this is the only use. So we can simply inline it. Differential Revision: https://phab.mercurial-scm.org/D11514
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 28 Sep 2021 19:29:44 +0200
parents 870100c0209b
children d3eb5f50052c
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/entry.rs	Tue Sep 28 19:15:46 2021 +0200
+++ b/rust/hg-core/src/dirstate/entry.rs	Tue Sep 28 19:29:44 2021 +0200
@@ -214,7 +214,7 @@
     pub fn size(&self) -> i32 {
         if self.removed() && self.flags.contains(Flags::MERGED) {
             SIZE_NON_NORMAL
-        } else if self.from_p2_removed() {
+        } else if self.removed() && self.flags.contains(Flags::CLEAN_P2) {
             SIZE_FROM_OTHER_PARENT
         } else if self.removed() {
             0