Skip to content

fix: resolve push approval signal path in git worktrees - #18

Merged
sam-phinizy merged 1 commit into
mainfrom
fix/worktree-push-signal
Mar 24, 2026
Merged

fix: resolve push approval signal path in git worktrees#18
sam-phinizy merged 1 commit into
mainfrom
fix/worktree-push-signal

Conversation

@sam-phinizy

Copy link
Copy Markdown
Contributor

Summary

  • Uses git rev-parse --show-toplevel instead of $CLAUDE_PROJECT_DIR to locate the push-approved signal file in check-git-push.sh
  • Updates the review-code skill to write the signal using the same git-toplevel path
  • Ensures the hook and skill agree on the signal location regardless of whether work happens in the main repo or a worktree

Closes #17

Test plan

  • In the main repo: run /review-code, approve, then git push — should succeed
  • In a worktree: run /review-code, approve, then git push — should now succeed (was blocked before)
  • Verify signal file is consumed (deleted) after a successful push

🤖 Generated with Claude Code

Use `git rev-parse --show-toplevel` instead of `$CLAUDE_PROJECT_DIR` to
locate the push-approved signal file. This ensures the hook and the
review-code skill agree on the signal path regardless of whether the
push originates from the main repo or a worktree.

Closes #17

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sam-phinizy
sam-phinizy merged commit 667088e into main Mar 24, 2026
2 checks passed
@sam-phinizy
sam-phinizy deleted the fix/worktree-push-signal branch March 24, 2026 10:41
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.

review-code hook: push approval signal not found when working in a git worktree

1 participant