# HG changeset patch # User Augie Fackler # Date 2020-09-07 21:13:45 # Node ID 0c6b2cc9a7bbb0a49390e26c356701da324cce06 # Parent c675295696439c1037feea93119b43151927ba54 git: make dirstate status() respect matcher As with other changes in this stack, we appear to have been getting lucky in the past. An upcoming change behaved _very_ oddly without this fix. Differential Revision: https://phab.mercurial-scm.org/D8997 diff --git a/hgext/git/dirstate.py b/hgext/git/dirstate.py --- a/hgext/git/dirstate.py +++ b/hgext/git/dirstate.py @@ -142,6 +142,8 @@ class gitdirstate(object): gstatus = self.git.status() for path, status in gstatus.items(): path = pycompat.fsencode(path) + if not match(path): + continue if status == pygit2.GIT_STATUS_IGNORED: if path.endswith(b'/'): continue