sirbrillig / phpcs-changed

🐘 Run phpcs on files and only report new warnings/errors compared to the previous version.
MIT License
31 stars 11 forks source link

Fix git status check for unchanged tracked file #90

Closed sirbrillig closed 1 year ago

sirbrillig commented 1 year ago

git status on a tracked, unchanged file will return an empty string. A regression in the refactoring of the git module made this return an exception. This PR fixes the issue by removing the guard.

This also adds tests to guard against this bug.

Fixes https://github.com/sirbrillig/phpcs-changed/issues/89