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

Make serve and watch respect .gitignore #1045

Closed
wants to merge 1 commit into from

Conversation

fmanco
Copy link

@fmanco fmanco commented Oct 2, 2019

When editing files with some editors (e.g. vim) temporary files are
constantly being modified causing mdbook serve and watch to constantly
rebuild the project.

To avoid this leverage the ignore crate to load the project's root
.gitignore file and skip changes on files ignored.

When editing files with some editors (e.g. vim) temporary files are
constantly being modified causing mdbook serve and watch to constantly
rebuild the project.

To avoid this leverage the ignore crate to load the project's root
.gitignore file and skip changes on files ignored.
@ehuss
Copy link
Contributor

ehuss commented Oct 3, 2019

Sorry, I'm a bit confused. Was it just coincidence that this and #1044 were opened within a few hours of each other?

@segfaultsourcery
Copy link
Contributor

@ehuss It's likely a hilarious coincidence. I did open a thread on /r/rust asking for input (I'll be making good use of that advice in a bit), so maybe @fmanco wanted to provide me with a better example? :)

@fmanco
Copy link
Author

fmanco commented Oct 3, 2019

What's better than 1 PR... 2 PRs. Kidding, this was a coincidence. @segfaultsourcery this is my first code in Rust which I'm learning just now, better examples is likely not something you'll get from me any time soon 😄 .

I'm fine with dropping this and just going with #1044 if you prefer. Only did this for learning and because the constant refreshing was annoying me. As long as we get something I'm happy.

@segfaultsourcery
Copy link
Contributor

I've only been writing it for a couple of months, myself. I'm also happy either way, I just want the itch scratched.

@fmanco
Copy link
Author

fmanco commented Oct 3, 2019

Let's go with yours @segfaultsourcery I'm not going to be able to put much time into this and you already got some feedback from r/rust which is great. Thanks for working on it.

@fmanco fmanco closed this Oct 3, 2019
@segfaultsourcery
Copy link
Contributor

segfaultsourcery commented Oct 4, 2019 via email

@fmanco
Copy link
Author

fmanco commented Oct 18, 2019

@segfaultsourcery I had no time to follow up on this, I'm glad your PR got merged. Once I have a bit of time I will make a new PR for the command line flag.

@segfaultsourcery
Copy link
Contributor

segfaultsourcery commented Oct 18, 2019 via email

@fmanco
Copy link
Author

fmanco commented Oct 18, 2019

Awesome. Thanks for the work. This is great.

@fmanco fmanco deleted the gitignore branch February 16, 2020 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants