Ignore `.hg` and `.git` directories in `search` function.