You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just noticed that mdbook serve (and presumably also other modes) don't ignore editor temporary files:
File changed: "/Users/zack/Documents/projects/rust/rust-book/second-edition/src/#ch01-02-hello-world.md#"
Building book...
All files whose basename matches one of the glob patterns #*#, .#*, *~, and *.swp are editor temporary/backup files; their appearance and disappearance should not trigger rebuilds. (There are probably more such glob patterns; this should be configurable in the .toml file, or better yet, read and honor .gitignore but that's a big task.)
The text was updated successfully, but these errors were encountered:
I think this is the right solution, and I'm pretty sure @BurntSushi published some of this stuff as part of his ripgrep work. So it shouldn't be too big a deal.
@steveklabnik That would be the ignore crate. Sadly, I fear I may have engineered it a bit too tightly to directory traversal. It biases strongly towards "do a directory traversal and ignore X according to some set of rules." Building it out to support other use cases will require real work. (The gitignore and glob matching itself should be reusable, but the higher level features of ignore might not be.)
gitignore support has been added in #1044. I think that mostly covers the spirit of this issue, so if there are additional changes or enhancements desired (such as better defaults, or better git integration, or whatever), feel free to open a new issue.
I just noticed that
mdbook serve
(and presumably also other modes) don't ignore editor temporary files:All files whose basename matches one of the glob patterns
#*#
,.#*
,*~
, and*.swp
are editor temporary/backup files; their appearance and disappearance should not trigger rebuilds. (There are probably more such glob patterns; this should be configurable in the .toml file, or better yet, read and honor.gitignore
but that's a big task.)The text was updated successfully, but these errors were encountered: