Skip to content

fix(detect): keep ignore globs within path segments - #1982

Closed
oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/graphifyignore-anchored-negation
Closed

oleksii-tumanov wants to merge 1 commit into
Graphify-Labs:v8from
oleksii-tumanov:fix/graphifyignore-anchored-negation

Conversation

@oleksii-tumanov

Copy link
Copy Markdown
Contributor

Summary

  • keep rooted and path-qualified ignore globs within path segments
  • preserve directory-only and recursive ** behavior with focused regressions

Fixes #1975

Result

For the reported /* plus !/src/ fixture, the path-normalized detected files are now:

src/app/main.py
src/lib/util.py

Root-level README.md and docs/ remain excluded.

Testing

  • python -m pytest tests/test_detect.py -q (165 passed)
  • python -m pytest tests/test_watch.py tests/test_extract.py -q (203 passed, 3 skipped)
  • python -m pytest tests/ -q --tb=short --ignore=tests/test_ollama_retry_cap.py (3358 passed, 33 skipped; optional OpenAI SDK tests were unavailable locally)
  • python -m ruff check graphify/detect.py tests/test_detect.py (passed)

@safishamsi

Copy link
Copy Markdown
Member

Landed on v8 (ships in 0.9.19) in aad5955, cherry-picked to preserve your authorship. Thanks @oleksii-tumanov — ignore globs now stay within a path segment (git semantics), so exclude-all + re-include-subtree works and /src/*.py no longer crosses /. Verified against git check-ignore; composes with the #1873/#1922 rework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

.graphifyignore anchored negation (!/dir/) doesn't re-include nested files — 'exclude-all, re-include subtree' collapses to zero files

2 participants