Skip to content

无法在 git worktree 项目运行 hooks 命令 #516

Closed

Description

@candy-Tong

Activity

  1. safishamsi commented on Apr 23, 2026

    @safishamsi
    Member

    Fixed in v0.4.32: _hooks_dir() now uses git rev-parse --path-format=absolute --git-path hooks instead of git config core.hooksPath. Git resolves this correctly for both normal repos and worktree checkouts, pointing to the shared hooks directory in the main repo's .git/hooks. Includes regression tests for install/uninstall from a worktree. Thanks to @candy-Tong for the PR analysis in #465.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions