Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only gitignore lib dir at repo root #54644

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

jakebailey
Copy link
Member

See: #54637 (comment)

When I deleted the top-level lib dir, I gitignored it. However, gitignore entries are not absolute and so lib/ matched any dir named lib anywhere in the repo, including src/lib.

Copy link
Member

@RyanCavanaugh RyanCavanaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL

@jakebailey jakebailey merged commit aa44cd8 into microsoft:main Jun 14, 2023
@jakebailey jakebailey deleted the fix-lib-ignore branch June 14, 2023 16:53
@fatcerberus
Copy link

fatcerberus commented Jun 14, 2023

gitignore entries are not absolute and so lib/ matched any dir named lib

I was just musing about this to myself the other day, too. It was like a mini-epiphany, “Wait, if *.foo ignores all .foo files anywhere in the tree then does that imply foo/ is also a partial match?” I didn’t follow up on it with a Google search, but it turns out I was onto something after all!

@jakebailey
Copy link
Member Author

Yeah, usually it's desirable (e.g. ignore node_modules/ anywhere), but in this case, not so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants