Skip to content

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