Ignore untracked files - #74
Merged
Merged
Conversation
perryqh
force-pushed
the
ph.ignore-untracked
branch
from
August 18, 2025 22:52
a75d297 to
03efe8c
Compare
jackboberg
approved these changes
Aug 19, 2025
4 tasks
dduugg
added a commit
that referenced
this pull request
Jul 27, 2026
) rubyatscale/code_ownership#149: adding a new team was silently ignored until the new team.yml was `git add`-ed. The project walk deliberately excludes untracked files (codeowners-rs#46/#74/#76 - so a developer can keep scratch files around locally without validate forcing them to assign an owner), but that exclusion also covered team config files, which define real ownership rules the moment they exist rather than being scratch work anyone would leave uncommitted on purpose. Exempt files matching `team_file_glob` from the tracked-files check specifically, leaving ordinary source files subject to it as before. Reproduced the exact bug against a real build first (a new team owning an already-tracked file, e.g. README.md, was reported unowned because the team file disappeared from the walk while README.md - already committed - did not), confirmed a fix, then found and preserved a directly conflicting existing test (test_skip_untracked_files) that relies on the untracked-scratch-file behavior on purpose, which a first, broader attempt at this fix would have silently regressed. Added two tests: one reproducing #149 end to end (new untracked team + existing tracked file -> validate succeeds), and one pinning that an untracked *source* file (non-team) is still correctly ignored, so the scoped nature of this fix doesn't regress by accident later. Verified: full `cargo test` suite (all 83+ tests, including the pre-existing test_skip_untracked_files), cargo clippy --all-targets, and cargo fmt --check all clean.
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.
Do not validate untracked git files