workingcopy: ignore .hg in walk

Summary: Working copy walker should not traverse into .hg directory.

Reviewed By: xavierd

Differential Revision: D17403172

fbshipit-source-id: 3efe61db8e09b602bff40b42b0d863248e88aea1
This commit is contained in:
Carolyn Busch 2019-09-19 10:12:14 -07:00 committed by Facebook Github Bot
parent 0304c45a44
commit d1fbf4280a

View File

@ -50,7 +50,8 @@ where
self.file_matches.push(Ok(candidate_path));
}
} else if filetype.is_dir() {
if self
if filename.as_str() != ".hg"
&& self
.matcher
.matches_directory(candidate_path.as_repo_path())
!= DirectoryMatch::Nothing