You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scripts/setup-hooks.sh: fails in a git worktree because .git is a file #137
HOOKS_DIR="${REPO_ROOT}/.git/hooks"if [[ !-d"${REPO_ROOT}/.git" ]];thenecho"Error: not a git repository. Run from the repo root.">&2exit 1
fi
Problem: In a linked worktree (git worktree add), .git is a file, not a directory. The script then prints "not a git repository" and exits 1. Also, git does not read hooks from <worktree>/.git/hooks.
Activity