Patchwork D11696: rust: Remove now-unused DirstateEntry::clear_ambiguous_mtime method

login
register
mail settings
Submitter phabricator
Date Oct. 19, 2021, 7:09 p.m.
Message ID <differential-rev-PHID-DREV-sizxmoiky4ijjz3zpe2o-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50020/
State Superseded
Headers show

Comments

phabricator - Oct. 19, 2021, 7:09 p.m.
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11696

AFFECTED FILES
  rust/hg-core/src/dirstate/entry.rs

CHANGE DETAILS




To: SimonSapin, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/hg-core/src/dirstate/entry.rs b/rust/hg-core/src/dirstate/entry.rs
--- a/rust/hg-core/src/dirstate/entry.rs
+++ b/rust/hg-core/src/dirstate/entry.rs
@@ -597,23 +597,6 @@ 
             false
         }
     }
-
-    pub fn clear_ambiguous_mtime(&mut self, now: TruncatedTimestamp) -> bool {
-        let ambiguous = self.mtime_is_ambiguous(now);
-        if ambiguous {
-            // The file was last modified "simultaneously" with the current
-            // write to dirstate (i.e. within the same second for file-
-            // systems with a granularity of 1 sec). This commonly happens
-            // for at least a couple of files on 'update'.
-            // The user could change the file without changing its size
-            // within the same second. Invalidate the file's mtime in
-            // dirstate, forcing future 'status' calls to compare the
-            // contents of the file if the size is the same. This prevents
-            // mistakenly treating such files as clean.
-            self.set_possibly_dirty()
-        }
-        ambiguous
-    }
 }
 
 impl EntryState {