-
Notifications
You must be signed in to change notification settings - Fork 209
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
In a linked git worktree, entire enable installs git hooks under:
$(git rev-parse --git-dir)/hooks
But Git executes hooks from:
$(git rev-parse --git-path hooks)
So prepare-commit-msg (and other Entire-managed hooks) are not triggered in linked worktrees.
Observed behavior in repro:
wrong_hook exists: yesactive_hook exists: no- commit succeeds, but hook tracer log is empty (hook never ran)
Expected behavior:
- Entire should install hooks in the active hooks directory from
git rev-parse --git-path hooks(and respectcore.hooksPath), so hooks run during commit in linked worktrees.
Related issues:
- This issue is related to another issue on
core.hooksPathnot being respected: entire enable hooks ignored when core.hooksPath is overridden (Husky) #228
Steps to reproduce
set -euo pipefail
ENTIRE_BIN="entire"
tmp="$(mktemp -d)"
log="$tmp/hook.log"
git init "$tmp/repo" >/dev/null
cd "$tmp/repo"
git config user.email [email protected]
git config user.name tester
echo init > f.txt
git add f.txt
git commit -m init >/dev/null
git worktree add "$tmp/wt" -b feat >/dev/null
cd "$tmp/wt"
"$ENTIRE_BIN" enable --agent claude-code --telemetry=false >/dev/null
git_dir="$(git rev-parse --git-dir)"
active_hooks="$(git rev-parse --git-path hooks)"
wrong_hook="$git_dir/hooks/prepare-commit-msg"
active_hook="$active_hooks/prepare-commit-msg"
echo "git-dir: $git_dir"
echo "active hooks: $active_hooks"
echo "wrong_hook exists: $([ -f "$wrong_hook" ] && echo yes || echo no)"
echo "active_hook exists: $([ -f "$active_hook" ] && echo yes || echo no)"
# tracer: append line to whichever Entire hook exists
for hook in "$wrong_hook" "$active_hook"; do
if [ -f "$hook" ] && grep -q "Entire CLI hooks" "$hook"; then
printf '\necho "HOOK_RAN_FROM: %s" >> "%s"\n' "$hook" "$log" >> "$hook"
chmod +x "$hook"
fi
done
: > "$log"
echo change >> f.txt
git add f.txt
git commit -m "repro" >/dev/null
echo "hook log content:"
cat "$log" || trueEntire CLI version
Entire CLI 0.4.4 (2f0ad9a)
OS and architecture
Darwin 25.2.0 arm64
Agent
Claude Code
Strategy
manual-commit (default)
Terminal
No response
Logs / debug output
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working