Skip to content

fix: expand trailing slash ignore patterns#583

Merged
tirth8205 merged 2 commits into
tirth8205:mainfrom
snvtac:snvtac/579-code-review-graph-root-ignore
Jul 17, 2026
Merged

fix: expand trailing slash ignore patterns#583
tirth8205 merged 2 commits into
tirth8205:mainfrom
snvtac:snvtac/579-code-review-graph-root-ignore

Conversation

@snvtac

@snvtac snvtac commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #579 by treating plain directory entries (for example vendor/) in .code-review-graphignore as recursive ignore rules.

What's changed

  • Normalize ignore file entries in _load_ignore_patterns:
    • Strip a leading / for compatibility
    • Expand trailing / to /** so directory-only entries are respected
  • Add regression coverage for vendor/ and generated/ in tests/test_incremental.py.

Validation

  • Added unit test coverage in tests/test_incremental.py.

@itxaiohanglover

Copy link
Copy Markdown

Nice fix! Treating trailing-slash patterns as recursive globs matches .gitignore semantics. The leading slash strip is a good touch too. Test with vendor/vendor/** is exactly the right regression case.

@tirth8205
tirth8205 merged commit f6c4846 into tirth8205:main Jul 17, 2026
1 check passed
Bakul2006 pushed a commit to Bakul2006/code-review-graph that referenced this pull request Jul 17, 2026
Port the final reviewed safe-anywhere versus root-relative behavior from
PR tirth8205#92 on top of PR tirth8205#583's trailing-slash support. Keep unanchored custom
directory patterns gitignore-compatible while anchoring ambiguous defaults.

Co-Authored-By: Chintan Gohil <echintangohil@gmail.com>
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.

[Bug]: .code-review-graphignore file in project root is not being respected

3 participants