Make git hooks a noop if entire is not enabled in the repo#467
Make git hooks a noop if entire is not enabled in the repo#467
Conversation
Entire-Checkpoint: db193847867e
PR SummaryLow Risk Overview This adds Written by Cursor Bugbot for commit e0dc047. Configure here. |
There was a problem hiding this comment.
Pull request overview
This PR addresses issue #460 by making git hooks no-ops when Entire is not enabled in a repository. The fix prevents global git hooks from creating .entire/logs/ directories in repos where Entire has never been set up or has been disabled.
Changes:
- Added
IsSetUp()andIsSetUpAndEnabled()helper functions to check if Entire is active in a repo - Updated git hook commands to check if Entire is enabled before performing any operations
- Added comprehensive tests for the new behavior (skipping when not set up or disabled)
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/entire/cli/settings/settings.go | Adds IsSetUp() and IsSetUpAndEnabled() helper functions to check repository setup status |
| cmd/entire/cli/hooks_git_cmd.go | Adds checks to exit early from git hooks when Entire is not set up or disabled, preventing file creation |
| cmd/entire/cli/hooks_git_cmd_test.go | Adds tests for the new skip behavior and updates existing tests to create settings.json |
| cmd/entire/cli/hook_registry_test.go | Updates test to create settings.json for proper test setup |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
In the case of git hooks being installed but entire not enabled in the repository this will make any git hook call a noop.
#460