MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / _hook_paths

Function _hook_paths

pre_commit/commands/install_uninstall.py:47–53  ·  view source on GitHub ↗
(
        hook_type: str,
        git_dir: str | None = None,
)

Source from the content-addressed store, hash-verified

45
46
47def _hook_paths(
48 hook_type: str,
49 git_dir: str | None = None,
50) -> tuple[str, str]:
51 git_dir = git_dir if git_dir is not None else git.get_git_common_dir()
52 pth = os.path.join(git_dir, 'hooks', hook_type)
53 return pth, f'{pth}.legacy'
54
55
56def is_our_script(filename: str) -> bool:

Callers 2

_install_hook_scriptFunction · 0.85
_uninstall_hook_scriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected