diff --git a/pre_commit/staged_files_only.py b/pre_commit/staged_files_only.py index b26892b1..2c33abd7 100644 --- a/pre_commit/staged_files_only.py +++ b/pre_commit/staged_files_only.py @@ -53,12 +53,14 @@ def _unstaged_changes_cleared(patch_dir: str) -> Generator[None, None, None]: if ( (sys.platform == 'darwin' or sys.platform == 'win32') and os.path.exists('./.git/fsmonitor--daemon.ipc') and - cmd_output('git', 'fsmonitor--daemon', 'status')[0] == 0 + cmd_output_b('git', 'fsmonitor--daemon', 'status')[0] == 0 ): logger.warning( 'The fsmonitor daemon is running; ' 'a bug in the fsmonitor daemon sometimes causes data loss ' - 'when running with pre-commit.', + 'when running with pre-commit. ' + 'It’s possible to disable it by running ' + '`git config core.fsmonitor false`', ) tree = cmd_output('git', 'write-tree')[1].strip()