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

.* in .gitignore causes mdbook to ignore everything #1492

Open
simonmichael opened this issue Mar 20, 2021 · 1 comment
Open

.* in .gitignore causes mdbook to ignore everything #1492

simonmichael opened this issue Mar 20, 2021 · 1 comment
Labels
A-ignore Area: gitignore, ignoring files

Comments

@simonmichael
Copy link

If you have .* in .gitignore, intending to make git and/or mdbook ignore dotted files, mdbook watch/serve will ignore everything. I suspect mdbook's parsing of .gitignore is not fully git compliant.

@simonmichael simonmichael changed the title .* in .gitignore causes mdbook to ignore everything .* in .gitignore causes mdbook to ignore everything Mar 20, 2021
@simonmichael simonmichael changed the title .* in .gitignore causes mdbook to ignore everything .* in .gitignore causes mdbook to ignore everything Mar 20, 2021
@simonmichael simonmichael changed the title .* in .gitignore causes mdbook to ignore everything A .* in .gitignore causes mdbook to ignore everything Mar 20, 2021
@simonmichael simonmichael changed the title A .* in .gitignore causes mdbook to ignore everything .* in .gitignore causes mdbook to ignore everything Mar 20, 2021
@weihanglo
Copy link
Member

There is a weird feature(?) in gitignore.rs: it appends an * if the pattern is unanchored. https:/nathankleyn/gitignore.rs/blob/590793e8/src/pattern.rs#L92-L95.

I propose using ignore instead. ignore is more maintained and provides hands of configuration for global/local .gitignore/.ignore files. This can make other ideas (#1187, #1440, #1487) more likely become true. We can moreover safely remove fn find_gitignore().


Off topic. The current description of gitignore in mdbook guide is incorrect. We actually respect .gitignore in parent dirs.

@ehuss ehuss added the A-ignore Area: gitignore, ignoring files label Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ignore Area: gitignore, ignoring files
Projects
None yet
Development

No branches or pull requests

3 participants