Skip to content

Make git-hooks a no-op on a deployed (non-git) checkout - #79

Merged
p3k merged 1 commit into
mainfrom
fix-git-hooks-on-deployed-checkout
Sep 28, 2026
Merged

p3k merged 1 commit into
mainfrom
fix-git-hooks-on-deployed-checkout

Conversation

@p3k

@p3k p3k commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • install depends on git-hooks unconditionally, but the server’s deployed copy of services/ is a plain rsynced tree – .git is deliberately excluded from that rsync – so git config core.hooksPath had nothing to configure and failed outright.
  • This has been breaking every server deploy since it landed: rss-box’s staging.yml "Publish services" step has been failing on exactly this, only surfaced once an unrelated, already-fixed deploy.sh-mismatch failure stopped masking it.
  • Skip the git config silently when there’s no .git to configure, rather than fail – install needs to run the same way on both a real clone and a deployed copy.

Test plan

  • Confirmed in a real git checkout: make git-hooks still sets core.hooksPath correctly
  • Confirmed in a simulated non-git deployed copy: make git-hooks now exits 0 instead of failing

🤖 Generated with Claude Code

install depends on git-hooks unconditionally, but the server’s
deployed copy of services/ is a plain rsynced tree – .git is
deliberately excluded from that rsync – so git config core.hooksPath
had nothing to configure and failed outright. Broke every server
deploy since this landed: staging’s Publish services step has been
failing on exactly this since, only surfaced once the earlier
deploy.sh-mismatch failure (unrelated, already fixed by hand on the
server) stopped masking it.

Skip the git config silently when there’s no .git to configure,
rather than fail – install still needs to run the same way on both
a real clone and a deployed copy. A real checkout is unaffected;
confirmed both cases directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@p3k
p3k merged commit 8587ecf into main Sep 28, 2026
6 checks passed
@p3k
p3k deleted the fix-git-hooks-on-deployed-checkout branch September 28, 2026 07:06
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.

1 participant