Skip to content

Hooks not installed in the right hooks directory for worktrees #808

@s0undt3ch

Description

@s0undt3ch

When on a git worktree, the hooks are not installed on the right hook dir:

❯ pre-commit install
pre-commit installed at /home/vampas/projects/SaltStack/console/raas/.git/worktrees/revan1/hooks/pre-commit

The hook does not run.

The hook only runs when I moved the pre-commit script to /home/vampas/projects/SaltStack/console/raas/.git/hooks/pre-commit

❯ pre-commit --version
pre-commit 1.10.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions