Skip to content

[Bug]: graphify reads files that git's global ignore file hides #4335

Closed

Description

@smngvlkz

What's happening

graphify skips files listed in a project's .gitignore, but it doesn't look at git's global ignore file. So a file that git ignores on your machine can still end up in the graph.

I noticed it because a local settings file showed up in graphify's file list, even though git ignores it. The rule for it lives in my global ignore file at ~/.config/git/ignore, not in the project's .gitignore.

The global ignore file is where a lot of people keep rules for local settings and secret files, so they don't have to add them to every project. graphify reading those files is the part that worries me.

How to see it for yourself

mkdir demo && cd demo && git init
echo 'x = 1' > a.py
echo 'SECRET = "abc"' > secret.py
echo 'secret.py' > ~/my-ignore
git config core.excludesFile ~/my-ignore

git status --short        # secret.py isn't listed, git ignores it
graphify update .

secret.py is in graphify-out/graph.json.

I used git config inside the repo so the example doesn't touch your global settings. It's the same setting git uses for the global ignore file, and ~/.config/git/ignore behaves the same way.

What should happen

If git ignores a file, graphify should skip it too, the same way it already does for .gitignore and .git/info/exclude. --no-gitignore could keep turning this off like it does for the others.

This came up before as a suggestion in #1363, but only the fix for .gitignore and .graphifyignore working together went in.


Version: graphify 0.9.85 · macOS 26.4 · Python 3.14

Activity

  1. github-actions commented on Oct 11, 2026

    @github-actions

    Thanks for opening this issue, @smngvlkz. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

  2. changed the title [-]graphify reads files that git's global ignore file hides[/-] [+][Bug]: graphify reads files that git's global ignore file hides[/+] on Oct 11, 2026
  3. safishamsi commented on Oct 11, 2026

    @safishamsi
    Member

    Fixed in 0.9.86 (now on PyPI) via #4339. Thanks @smngvlkz!

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