Skip to content

Ignore untracked files - #74

Merged
perryqh merged 3 commits into
mainfrom
ph.ignore-untracked
Aug 19, 2025
Merged

Ignore untracked files#74
perryqh merged 3 commits into
mainfrom
ph.ignore-untracked

Conversation

@perryqh

@perryqh perryqh commented Aug 18, 2025

Copy link
Copy Markdown
Contributor

Do not validate untracked git files

@perryqh
perryqh force-pushed the ph.ignore-untracked branch from a75d297 to 03efe8c Compare August 18, 2025 22:52
@perryqh
perryqh merged commit 94c9bdf into main Aug 19, 2025
9 checks passed
@github-project-automation github-project-automation Bot moved this from Triage to Done in Modularity Aug 19, 2025
@perryqh
perryqh deleted the ph.ignore-untracked branch September 5, 2025 03:36
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants