Skip to content

fix: skip files ignored by gitignore#78

Open
zerone0x wants to merge 1 commit intococoindex-io:mainfrom
zerone0x:fix/gitignore-indexer
Open

fix: skip files ignored by gitignore#78
zerone0x wants to merge 1 commit intococoindex-io:mainfrom
zerone0x:fix/gitignore-indexer

Conversation

@zerone0x
Copy link

Summary

  • load the project .gitignore with pathspec and merge nested rules
  • wrap the directory walker with a gitignore-aware matcher so we skip ignored files
  • add regression coverage to ensure ignored files stay out of the index while negations still work

Fixes #62

Testing

  • uv run pytest tests/test_e2e.py::test_session_respects_gitignore
  • uv run pytest tests/test_e2e.py::test_session_happy_path

Fixes cocoindex-io#62

- add pathspec dependency and load project .gitignore

- apply gitignore-aware matcher that handles nested rules

- add regression test ensuring ignored files stay out of the index
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.

Ignore files matching .gitignore

1 participant