Skip to content

hook install adds a merge attribute for gitignored graphify-out/graph.json #2595

Description

@MohabMohie

Reproduction

On Graphify 0.9.38:

  1. A repository ignores /graphify-out/.
  2. Its tracked .gitattributes has no Graphify rule.
  3. Run graphify hook install.

The installer appends:

graphify-out/graph.json merge=graphify

This dirties the tracked worktree even though git check-ignore graphify-out/graph.json confirms the file can never participate in a merge.

Re-running graphify hook install after removing the redundant line adds it again. The executable hooks themselves append safely and work.

Expected

If graphify-out/graph.json is ignored, register the local merge-driver config but do not mutate tracked .gitattributes, or make the attribute opt-in. Preserve current behavior when graph output is tracked.

This matters for automated tool upgrades because the official guidance says to rerun graphify hook install after reinstall/upgrade; an otherwise local hook refresh should not create an unrelated tracked diff.

Activity

  1. jecanore commented on Aug 30, 2026

    @jecanore

    Ran into this from the other direction while setting up hook install on a project with a customized output directory — filed #3206 for the wrong-path part. Both bugs live in the same _register_merge_driver/_merge_attr_line code, so I opened #3207 to fix them together (skips the .gitattributes line when the target is gitignored, exactly what's described here).

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