diff rust/hg-core/src/dirstate/entry.rs @ 48156:d342815ff827

dirstate-item: replace call to new_added The constructor is on its way out, so we inline the last relevant call before dropping it. Differential Revision: https://phab.mercurial-scm.org/D11600
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Oct 2021 09:15:03 +0200
parents b2af515b4faf
children b45c4dc65adc
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/entry.rs	Fri Oct 01 09:14:10 2021 +0200
+++ b/rust/hg-core/src/dirstate/entry.rs	Fri Oct 01 09:15:03 2021 +0200
@@ -81,7 +81,11 @@
                     Self::new_normal(mode, size, mtime)
                 }
             }
-            EntryState::Added => Self::new_added(),
+            EntryState::Added => Self {
+                flags: Flags::WDIR_TRACKED,
+                mode_size: None,
+                mtime: None,
+            },
             EntryState::Removed => Self {
                 flags: if size == SIZE_NON_NORMAL {
                     Flags::P1_TRACKED | Flags::P2_INFO