(hook_type: str, force: bool, append: bool)
return create_hook(
        hook_dir_path=hook_dir_path,
        force=force,
        local_hook_support=True,
        hook_type=hook_type,
        append=append,
    )
Global pre-commit/pre-push hook installation.
Global pre-commit/pre-push hook installation.
Global pre - commit / pre - push hook installation .
def install_global(hook_type: str, force: bool, append: bool) -> int:
    """Global pre-commit/pre-push hook installation."""
    check_git_installed()
    hook_dir_path = get_global_hook_dir_path()

    if not hook_dir_path:
        hook_dir_path = os.path.expanduser("~/.git/hooks")
        subprocess.run(
            [GIT_PATH, "config", "--global", "core.hooksPath", hook_dir_path]
        )

    return create_hook(
        hook_dir_path=hook_dir_path,
        force=force,
        local_hook_support=True,
        hook_type=hook_type,
        append=append,
    )
def install_global ( hook_type : str , force : bool , append : bool ) -> int : check_git_installed ( ) hook_dir_path = get_global_hook_dir_path ( ) if not hook_dir_path : hook_dir_path = os . path . expanduser ( "~/.git/hooks" ) subprocess . run ( [ GIT_PATH , "config" , "--global" , "core.hooksPath" , hook_dir_path ] ) return create_hook ( hook_dir_path = hook_dir_path , force = force , local_hook_support = True , hook_type = hook_type , append = append , )