When a directory is removed, pocket's file watcher will raise an event with REMOVE and the path of the directory; but the fact that the path refers to a directory is not part of the event because it's not available from the underlying filesystem notification APIs.
When a .gitignore file contains an entry that specifically refers to a directory, /dist/ as opposed to /dist, the path will only be ignored when it can be identified definitively as a directory. If the directory exists then the path dist will resolve to the directory, otherwise it needs to specified as dist/ for git-check-ignore know the path is referring to a directory.
As a result of these two facts, the git filter in pocket fails to filter events describing the removal of directories that are listed in the .gitignore as directories because the directory doesn't exist at the time of the check and the path in the event doesn't contain the trailing slash.
When a directory is removed, pocket's file watcher will raise an event with REMOVE and the path of the directory; but the fact that the path refers to a directory is not part of the event because it's not available from the underlying filesystem notification APIs.
When a
.gitignorefile contains an entry that specifically refers to a directory,/dist/as opposed to/dist, the path will only be ignored when it can be identified definitively as a directory. If the directory exists then the pathdistwill resolve to the directory, otherwise it needs to specified asdist/forgit-check-ignoreknow the path is referring to a directory.As a result of these two facts, the git filter in pocket fails to filter events describing the removal of directories that are listed in the
.gitignoreas directories because the directory doesn't exist at the time of the check and the path in the event doesn't contain the trailing slash.