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
fix(hooks): check the whole codebase as staged in pre-commit - #71
The pre-commit hook now checks a snapshot of the index across the whole codebase. It used to pass staged paths to oxfmt and oxlint, which then read the working tree, so a file formatted on disk but never re-staged could slip through and unstaged edits could block a clean commit. commit -a and commit <path> are covered too, because git points GIT_INDEX_FILE at the right index.
The hook passed staged paths to oxfmt and oxlint, which read the working tree. A file formatted on disk but never re-staged could slip through, and unstaged edits could block a clean commit. It now exports the index to a temporary directory and checks every tracked file there, so it sees exactly what the commit will contain. The header names all four repos sharing the hook, so every copy is byte-identical.
Update AGENTS.md for the four-repository hook contract
.githooks/pre-commit:10
Please also update AGENTS.md:113-116: it still says this hook is shared only with soql-parser-js and instructs contributors to sync only those two copies. That contradicts this new four-repository contract and can let the simple-excel and simple-xml copies drift during future changes.
Also normalize the snapshot path to an absolute one before installing
the EXIT trap. A relative TMPDIR made mktemp return a relative path,
which the trap then resolved from inside the snapshot after the cd and
so never removed. The hook runs from the worktree root, so prefixing
$PWD is exact.
AGENTS.md now names simple-excel and simple-xml alongside
soql-parser-js as the repositories the hook, release scripts and
workflows are shared with, matching the hook header.
Went through Copilot's suppressed (low-confidence) comment — it was valid:
AGENTS.md:113-116 — fixed, the sharing note now names simple-excel and simple-xml alongside soql-parser-js, matching the hook header. All three sibling repos carry the same six files.
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
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.
Summary
commit -aandcommit <path>are covered too, because git pointsGIT_INDEX_FILEat the right index.checkout-indexruns with--ignore-skip-worktree-bits, so files hidden by a sparse checkout orgit update-index --skip-worktreeare checked too. simple-xml gets the same change in fix(hooks): export skip-worktree entries into the pre-commit snapshot simple-xml#20, which keeps all four copies byte-identical.No CHANGELOG entry, since nothing under
src/changed.Test plan
npm run format:checkandnpm run lintsrc/