fix: add --no-gitignore extraction opt-out#1979
Closed
Mzt00 wants to merge 2 commits into
Closed
Conversation
safishamsi
added a commit
that referenced
this pull request
Jul 18, 2026
…-up to #1979) The PR always wrote gitignore=not no_gitignore into .graphify_build.json, so a flag-less `graphify extract` after `--no-gitignore` reset it to True and the git-ignored code silently disappeared again — the exact #1971 complaint. Write False only when the flag is set (None = leave as-is, mirroring #1886 excludes), and honor the persisted value for the run when the flag is absent. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
|
Landed on v8 (ships in 0.9.19) in f17e2c5, cherry-picked to preserve your authorship. Thanks @MZT006 — --no-gitignore disables only VCS ignore rules while keeping .graphifyignore and the secret/sensitive screens. Follow-up added on top (caa6f9e): the setting now persists and is not clobbered back on by a later flag-less graphify extract, so git-ignored code does not silently disappear (the #1971 complaint). |
Collaborator
|
Credit correction: this fix is by @Mzt00 (I earlier mistyped @MZT006, an unrelated user — apologies to them). Report was @JensD-git. Fixed in the changelog and 0.9.19 release notes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
graphify extract <path> --no-gitignorefor generated or transpiled source that is excluded from Git but still belongs in the graph. Fixes #1971With the flag, Graphify:
.gitignorefiles;$GIT_DIR/info/exclude;.graphifyignoreexplicit--excludepatterns, noise filters, and sensitive-file checks; andDefault extraction behavior is unchanged.
Implementation
The detector APIs now accept a keyword-only
gitignore: bool = True. The extract CLI passesFalsefor both full and incremental scans when--no-gitignoreis present.The setting is stored in
graphify-out/.graphify_build.json. Rebuild and watch paths read it before rescanning or filtering filesystem events, preventing generated files from disappearing after the initial extraction. Existing build configs without the key default toTrue.Why
.graphifyignoreremains activeThe staged loader change separates Graphify-owned rules from VCS-owned rules. With
gitignore=False,_load_dir_own_ignore()loads only.graphifyignore;_load_graphifyignore()skips.git/info/excludebut still loads.graphifyignoreat ancestor, root, and nested-directory anchors.detect()and watch/rebuild callers pass the same setting through every scan path.The end-to-end test confirms this behavior: Git-ignored
Gen.csandLocal.csare included, while.graphifyignore-excludedHidden.csremains absent.Behavior
--no-gitignore.gitignore.git/info/exclude.graphifyignore--excludeTests and validation
.graphifyignoreremains active.