Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fsmonitor: fix empty path in dirfilter (#601)
Summary: Fixes the bug discussed in Discord here: https://discord.com/channels/1042527964224557107/1042527965256364157/1095764831480590467 Running the ignore matcher on an empty path produces incorrect results. In the rust implementation, this isn't an issue, because there are directory matchers that run on the directory result. In the Python treestate bindings, we don't have that functionality, so it returns an empty string. This makes this logic match the code in `dirstate.py` ([line ~925](https://github.com/facebook/sapling/blob/main/eden/scm/edenscm/dirstate.py#L925-L926)) where we check for path being an empty string. This fixes `sl status` (and related functionality) when fsmonitor is enabled and there's a complex gitignore file that ignores files in the root directory. Pull Request resolved: #601 Test Plan: Added Mercurial integration test and manually tested locally Reviewed By: quark-zju Differential Revision: D44961756 Pulled By: zzl0 fbshipit-source-id: 57dd0d052ceeb184694c6f3b1a71ac53bf0e1028
- Loading branch information