rust: remove now-unused DirstateEntry::clear_ambiguous_mtime method
authorSimon Sapin <simon.sapin@octobus.net>
Tue, 19 Oct 2021 21:03:13 +0200
changeset 48259 84f6b0c41b90
parent 48258 c591944f42c1
child 48260 269ff8978086
rust: remove now-unused DirstateEntry::clear_ambiguous_mtime method Differential Revision: https://phab.mercurial-scm.org/D11696
rust/hg-core/src/dirstate/entry.rs
--- a/rust/hg-core/src/dirstate/entry.rs	Tue Oct 19 22:14:48 2021 +0200
+++ b/rust/hg-core/src/dirstate/entry.rs	Tue Oct 19 21:03:13 2021 +0200
@@ -580,23 +580,6 @@
     pub fn need_delay(&self, now: i32) -> bool {
         self.state() == EntryState::Normal && self.mtime() == now
     }
-
-    pub fn clear_ambiguous_mtime(&mut self, now: i32) -> bool {
-        let ambiguous = self.need_delay(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 {