tailwindcss/crates
Robin Malfait 367b59371f
ignore unreachable gitignore whitelists when promoting sources
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.
2026-08-13 11:35:41 +02:00
..
classification-macros Improve boundary classification (#17005) 2025-03-07 00:00:54 +00:00
ignore rebase ignore crate from 0.4.24 to 0.4.33 2026-08-13 11:34:18 +02:00
node Use wasm as a fallback for @tailwindcss/oxide (#20383) 2026-08-04 18:41:43 +02:00
oxide ignore unreachable gitignore whitelists when promoting sources 2026-08-13 11:35:41 +02:00