Use repository-owned native Git hooks - #300
Merged
Merged
Conversation
patroza
marked this pull request as ready for review
August 3, 2026 12:45
patroza
added a commit
that referenced
this pull request
Aug 4, 2026
* refactor: use repository-owned native git hooks * test: keep clone hook fixture synchronous * test: map clone fixture filesystem failures --------- Co-authored-by: Stack Test <stack-test@example.com>
patroza
added a commit
that referenced
this pull request
Aug 4, 2026
* refactor: use repository-owned native git hooks * test: keep clone hook fixture synchronous * test: map clone fixture filesystem failures --------- Co-authored-by: Stack Test <stack-test@example.com>
patroza
added a commit
that referenced
this pull request
Aug 4, 2026
* refactor: use repository-owned native git hooks * test: keep clone hook fixture synchronous * test: map clone fixture filesystem failures --------- Co-authored-by: Stack Test <stack-test@example.com>
patroza
added a commit
that referenced
this pull request
Aug 5, 2026
* refactor: use repository-owned native git hooks * test: keep clone hook fixture synchronous * test: map clone fixture filesystem failures --------- Co-authored-by: Stack Test <stack-test@example.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Worktrees and branch checkouts must reconcile pnpm dependencies without relying on a machine-specific shared dispatcher or an agent noticing missing
node_modules. Fresh repositories cloned by T3 need the same setup before they are handed to the user.What
Moves commit, push, and checkout hooks into tracked
.githooks, configurescore.hooksPath=.githooksduringpnpm install, and removes Husky. The checkout hook runs synchronously for branch changes and linked-worktree creation. T3 also activates and triggers the native checkout hook immediately after cloning repositories that provide it.How
The clone service configures the repository-local hook path, then checks out the fresh HEAD once; Git invokes
post-checkoutand waits for its package reconciliation. Existing clones are activated by their nextpnpm install, while machine bootstrap remains responsible for reconciling already-present repositories. Lefthook is documented only as a possible future parallel job runner and is not installed or used.Remarks
Focused native-hook and source-control tests pass. Design angles: reliable package state at user handoff — pragmatic native hooks now; a future parallel runner can sit behind those hooks without owning installation.