Whether an explicitly listed directory is git ignored (and should bypass
the ignore rules as an external source) was decided by walking up from the
directory and letting the nearest `.gitignore` with a definitive answer
win. That's only half of git's precedence: a whitelist is unreachable when
a parent directory is excluded — git never descends into an excluded
directory, so re-include rules inside of it have no effect. With
.gitignore parent/
parent/.gitignore !child/
`@source "./parent/child"` stayed a regular auto source (the `!child/`
whitelist answered first), so the `.gitignore` files inside it kept
applying, even though git considers the whole tree ignored.
Decide exclusion the way git does instead: walk the path from the top
down, settling for every directory along the way whether it is excluded —
the first excluded directory makes everything below it ignored. Within a
single directory's decision the deepest `.gitignore` still wins, so
directories re-included by a deeper, reachable `!dir` pattern stay regular
auto sources. Both directions are now pinned by unit tests next to the
other promotion tests.
|
||
|---|---|---|
| .. | ||
| classification-macros | ||
| ignore | ||
| node | ||
| oxide | ||