# HG changeset patch # User Kyle Lippincott # Date 2018-08-09 00:07:27 # Node ID 0d032756e9bfa6c36d8dc484c95a787421d94df9 # Parent b9f94d67ea732831cedc60de95698a0e6e5b1d06 dirstate: add comment on why we don't need to check if something is a dir/file Differential Revision: https://phab.mercurial-scm.org/D4161 diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -912,6 +912,11 @@ class dirstate(object): continue raise for f, kind, st in entries: + # If we needed to inspect any files, visitentries would have + # been 'this' or 'all', and we would have set it to None + # above. If we have visitentries populated here, we don't + # care about any files in this directory, so no need to + # check the type of `f`. if visitentries and f not in visitentries: continue if normalizefile: