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
Hooks ignore core.hooksPath and do not run in linked worktrees #12
), with gitDir being the per-worktree directory (https://github.com/inline0/pitmaster/blob/5beb97da195f57f4e9ea06bfc68ac71144bfefba/src/Repository.php#L5391,
In a linked worktree gitDir is .git/worktrees/<name>, so the shared .git/hooks scripts never run there. git runs the common hooks in every worktree.
core.hooksPath is not read anywhere in src/, so repositories that keep their hooks elsewhere (a common setup with tools that manage hooks) run none of them through Pitmaster.
Repro
$repo = Pitmaster::open('/repo'); // has an executable .git/hooks/pre-commit that exits 1$wt = $repo->addWorktree('/tmp/wt', 'feature');
$linked = Pitmaster::open('/tmp/wt');
// change and add a file in /tmp/wt$linked->commit('msg'); // succeeds; the pre-commit hook did not run
Expected
Hooks resolve to core.hooksPath when set, otherwise to the common directory's hooks/, as in git.
Activity