镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Ignore binary extensions, except in folder names - #17595

Merged
RobinMalfait merged 6 commits into
mainfrom
fix/issue-17569
Apr 12, 2025
Merged

RobinMalfait merged 6 commits into
mainfrom
fix/issue-17569

Conversation

@RobinMalfait

@RobinMalfait RobinMalfait commented Apr 7, 2025 •

Copy link
Copy Markdown
Contributor

We generate a glob to ignore binary extensions that looks something like this:

*.{mp4,pages,exe,…}

However, if you have a folder that happens to end in .pages for example, then this folder will be ignored in its entirety.

To solve this, we added a new flag to the Gitignore struct so we can register a bunch of ignore rules that only apply to paths and not folders.

Fixes: #17569

Test plan

  • Added a unit test

We generate a glob to ignore binary extensions that looks like this:
```
*.{mp4,pages,exe,…}
```

However, if you have a folder that happens to end in `.pages` for
example, then this folder will be ignored in its entirety.

To solve this, we will instead generate the following globs:
```
*.{mp4,pages,exe,…}
!*.{mp4,pages,exe,…}/
```

This way, the `/` indicates that we are dealing with a folder and that
these should _not_ be ignored.
The implementation we chose right now means that there is a situation
where an explicit ignore in your `.gitignore` file could now be included
due to the fix we implemented.

We can always add an additional `@source not` on top of everything, but
ideally this is not needed at all.
@philipp-spiess
philipp-spiess marked this pull request as ready for review April 11, 2025 16:30
@philipp-spiess
philipp-spiess requested a review from a team as a code owner April 11, 2025 16:30
@RobinMalfait
RobinMalfait merged commit bbd916a into main Apr 12, 2025
@RobinMalfait
RobinMalfait deleted the fix/issue-17569 branch April 12, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tailwind .pages folder error

3 participants