Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Chiusa Adatta ai principianti
#4,335 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #4339 di @smngvlkz — chiusa senza merge

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
git, python
Ambito
tooling

Direzione di ricerca

Trova il codice che legge .gitignore e .git/info/exclude, quindi segui il modo in cui graphify update . decide quali file includere. Verifica come Git espone core.excludesFile e come viene applicato --no-gitignore. Il lavoro è completato quando i file nascosti dal file globale di esclusione configurato vengono ignorati e --no-gitignore mantiene il comportamento documentato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
124k
Fork
11.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Graphify-Labs/graphify

Tutte le issue di Graphify-Labs/graphify

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.