mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
44ed39320c
commit
c919a1d628
1 changed files with 5 additions and 4 deletions
|
|
@ -51,14 +51,15 @@ def _intent_to_add_cleared() -> Generator[None, None, None]:
|
||||||
@contextlib.contextmanager
|
@contextlib.contextmanager
|
||||||
def _unstaged_changes_cleared(patch_dir: str) -> Generator[None, None, None]:
|
def _unstaged_changes_cleared(patch_dir: str) -> Generator[None, None, None]:
|
||||||
if (
|
if (
|
||||||
(sys.platform == 'darwin' or sys.platform == 'win32')
|
(sys.platform == 'darwin' or sys.platform == 'win32') and
|
||||||
and os.path.exists('./.git/fsmonitor--daemon.ipc')
|
os.path.exists('./.git/fsmonitor--daemon.ipc') and
|
||||||
and cmd_output('git', 'fsmonitor--daemon', 'status')[0] == 0
|
cmd_output('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.",
|
||||||
|
)
|
||||||
|
|
||||||
tree = cmd_output('git', 'write-tree')[1].strip()
|
tree = cmd_output('git', 'write-tree')[1].strip()
|
||||||
diff_cmd = (
|
diff_cmd = (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue