Skip to content

Installer should no-op in already-integrated repos and preserve Git hooks config #401

Closed

Description

@the-one-and-only-niko

Graphify's installer can damage a repository that already vendors its Graphify integration. We hit this in LucentiveLabs/intuitive-agent-system after adding tracked Graphify integration files and repo-local launchd scripts.

Observed failure modes:

  • graphify install unset core.hooksPath when .husky/_ was not present yet, which disabled Husky pre-commit / pre-push hooks.
  • It wrote Graphify hooks into .git/hooks/post-commit and .git/hooks/post-checkout, even though the repo uses Husky through core.hooksPath.
  • It created files such as .claude/settings.json, .codex/hooks.json, and .cursor/rules/graphify.mdc that were already tracked in the repo, leaving duplicate untracked files that blocked the next git pull with a "would be overwritten by merge" error.
  • In at least one affected checkout, core.bare=true was set on a non-bare working tree. The exact path to this state is unclear, but the installer should never leave a working checkout with core.bare=true.

Requested behavior:

  • Detect an already-integrated repo, for example by checking for scripts/graphify/ plus tracked .claude/settings.json / .codex/hooks.json, and no-op or print repo-specific guidance.
  • Do not unset core.hooksPath just because the target hook directory is missing; regenerate it or warn instead.
  • Do not write duplicate Graphify hooks to .git/hooks when core.hooksPath points elsewhere.
  • Never set core.bare=true on a working tree.

This is not a request for Lucentive-specific behavior; the general ask is for the installer to be idempotent and conservative in repos that already ship Graphify integration.

Activity

  1. added a commit that references this issue on Apr 17, 2026
  2. added a commit that references this issue on Apr 17, 2026
  3. safishamsi commented on Apr 17, 2026

    @safishamsi
    Member

    Fixed in v0.4.19 — added _hooks_dir() helper that reads core.hooksPath via git config before falling back to .git/hooks. Husky and similar tools should work correctly now.

  4. added a commit that references this issue on Apr 23, 2026
  5. added a commit that references this issue on May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions