mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Add instruction on how to disable the monitor and switch to cmd_output_b
This commit is contained in:
parent
c2deff948e
commit
0355349b81
1 changed files with 4 additions and 2 deletions
|
|
@ -53,12 +53,14 @@ def _unstaged_changes_cleared(patch_dir: str) -> Generator[None, None, None]:
|
||||||
if (
|
if (
|
||||||
(sys.platform == 'darwin' or sys.platform == 'win32') and
|
(sys.platform == 'darwin' or sys.platform == 'win32') and
|
||||||
os.path.exists('./.git/fsmonitor--daemon.ipc') 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(
|
logger.warning(
|
||||||
'The fsmonitor daemon is running; '
|
'The fsmonitor daemon is running; '
|
||||||
'a bug in the fsmonitor daemon sometimes causes data loss '
|
'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()
|
tree = cmd_output('git', 'write-tree')[1].strip()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue