Repository navigation
Move the Rust glob matcher and gitignore handling into submodules - #2707
somewhatabstract wants to merge 4 commits into
Conversation
Put the glob matcher in a `glob` module and the gitignore handling, including IgnoreFile, in a `gitignore` module, each with its own types, so either could later become a crate of its own. `glob` depends on nothing else in the crate and exposes only what `gitignore` uses. The gitignore files and functions drop their `gitignore_` prefix, now that the module names them. Nothing changes behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
Bundle ReportBundle size has no change ✅ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2707 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 111 112 +1
Lines 3830 3843 +13
Branches 3038 3051 +13
=========================================
+ Hits 3830 3843 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
🦋 Changeset detectedLatest commit: 69cbdb4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Give gitignore its own bytes_before_nul so glob no longer exposes it, move the gitignore glob options to the module root, refer to sibling files with `super::` paths, and make BracketSet's fields module-private like CompiledGlob's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QjLhVH1NnUc7MzCSYLd8Yn
This groups the clean-room glob matcher and gitignore handling into two submodules of
checksync-core. That way they're already shaped like separate crates, ready to be split out later. They follow the existingerrors.rsanderrors/pattern. Behaviour doesn't change: this only moves and renames.glob: the matcher files, with their ownglob/types.rs. The module uses nothing else from the crate. It exposes onlycompile_glob,compiled_glob_matches,GlobOptions,CompiledGlobandbytes_before_nul.gitignore: pattern parsing, matching,IgnoreFile, andgitignore/types.rs. The module path replaces the oldgitignore_prefixes. It usesglobonly through whatglob.rsexposes.IgnoreFileis still re-exported aschecksync_core::IgnoreFile.To lift
gitignoreout as its own crate later,IgnoreDecisionand the path helpers it uses (node_relative,node_normalize, andnormalize_separatorson Windows) would need to move with it or into a shared crate.globcould be lifted out as it is.The clean-room agent that wrote both made the move, so the code stays its own work. Part of #2615.
Test plan
ignore-vectors.json.Generated by Claude Code