Patchwork D11590: dirstate: drop an incorrect comment

login
register
mail settings
Submitter phabricator
Date Oct. 3, 2021, 12:40 a.m.
Message ID <differential-rev-PHID-DREV-j3g4ast7gxy7bllcgjwi-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49914/
State Superseded
Headers show

Comments

phabricator - Oct. 3, 2021, 12:40 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We are actually checking that we are only in a case were the file might needs
  lookup before doing this. So the comment is not relevant.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/dirstate.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -579,10 +579,7 @@ 
             not possibly_dirty and not p2_info and wc_tracked and p1_tracked
         )
 
-        # this mean we are doing call for file we do not really care about the
-        # data (eg: added or removed), however this should be a minor overhead
-        # compared to the overall update process calling this.
-        if need_parent_file_data or parentfiledata is None:
+        if need_parent_file_data and parentfiledata is None:
             parentfiledata = self._get_filedata(filename)
 
         self._map.reset_state(