Open simonmichael opened 3 years ago
There is a weird feature(?) in gitignore.rs: it appends an *
if the pattern is unanchored. https://github.com/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.
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.