Skip to content

fix: noir precommit re-staging inside worktrees#23628

Merged
vezenovm merged 1 commit into
merge-train/fairiesfrom
nchamo/fix-noir-precommit-worktree
May 28, 2026
Merged

fix: noir precommit re-staging inside worktrees#23628
vezenovm merged 1 commit into
merge-train/fairiesfrom
nchamo/fix-noir-precommit-worktree

Conversation

@nchamo

@nchamo nchamo commented May 28, 2026

Copy link
Copy Markdown
Contributor

Same bug and fix as #22557 — that PR patched yarn-project/precommit.sh but didn't touch noir-projects/precommit.sh, which has the same cd $(dirname $0) + later git rev-parse --show-toplevel pattern.

Inside a worktree, git sets GIT_DIR absolutely when invoking hooks; after the cd, --show-toplevel returns the noir-projects/ subdir instead of the worktree root. The re-staging step then runs git add on paths that don't exist on disk, and git add on a missing path that's in the index stages a deletion — so committing .nr files inside a worktree silently dropped them from the tree.

Same one-liner fix: unset GIT_DIR near the top.

@nchamo nchamo self-assigned this May 28, 2026
@nchamo nchamo marked this pull request as ready for review May 28, 2026 16:25
@nchamo nchamo requested review from dbanks12 and vezenovm May 28, 2026 17:01
@vezenovm vezenovm merged commit 9247eab into merge-train/fairies May 28, 2026
28 checks passed
@vezenovm vezenovm deleted the nchamo/fix-noir-precommit-worktree branch May 28, 2026 20:40
danielntmd pushed a commit to danielntmd/aztec-packages that referenced this pull request Jun 4, 2026
BEGIN_COMMIT_OVERRIDE
refactor(aztec-nr): use constructor methods for MessageDelivery variants
(AztecProtocol#23596)
docs: update testing_contracts.md for two-crate aztec new layout
(AztecProtocol#23617)
fix: drop usage of include and indexof on types that support equals
(AztecProtocol#23595)
fix: unused ts expressions in tests (AztecProtocol#23621)
feat(aztec-nr): Get tagging index for constrained delivery  (AztecProtocol#23359)
feat!: demote auth registry to non-protocol contract (AztecProtocol#23106)
feat(aztec-nr)!: embed BoundedVec max length in validation requests
(AztecProtocol#23622)
fix: regenerate standard contract addresses after auth registry demotion
(AztecProtocol#23640)
feat(aztec-nr): encrypt handshake log for indistinguishability (AztecProtocol#23638)
feat!: demote public_checks to non-protocol contract (AztecProtocol#23217)
fix: noir precommit re-staging inside worktrees (AztecProtocol#23628)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants