Repository navigation
Make git-hooks a no-op on a deployed (non-git) checkout - #79
Merged
Merged
Conversation
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>
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.
Summary
installdepends ongit-hooksunconditionally, but the server’s deployed copy ofservices/is a plain rsynced tree –.gitis deliberately excluded from that rsync – sogit config core.hooksPathhad nothing to configure and failed outright.staging.yml"Publish services" step has been failing on exactly this, only surfaced once an unrelated, already-fixeddeploy.sh-mismatch failure stopped masking it.git configsilently when there’s no.gitto configure, rather than fail –installneeds to run the same way on both a real clone and a deployed copy.Test plan
make git-hooksstill setscore.hooksPathcorrectlymake git-hooksnow exits 0 instead of failing🤖 Generated with Claude Code