feat: Add section about partial clones with git clone --filter='blob:none'
#2035
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I found this option,
--filter='blob:none'
, while setting up my clone of rustc, and I think it's much nicer than a shallow clone with--depth 1
:).https://github.blog/open-source/git/get-up-to-speed-with-partial-clone-and-shallow-clone/ describes what it does compared to a
--depth 1
clone.In short, as I understand it, it doesn't pull blobs per default, only on demand.
"Blobs" are all file and directory contents.
So initially, only file and directory contents for the current
HEAD
commit will be downloaded, and operations like jumping back in the git history will then automatically pull required blobs on demand.I.e., this doesn't break git operations like a shallow clone does.
Question: Building the book locally worked fine, until I switched to a new branch.
Now
mdbook-linkcheck
throws a lot of errors about unlinked things that I a) didn't touch, and b) that seem to be linked properly.Maybe due to f15edb8?Log of linkcheck errors:
Edit: Ah, seems like CI is throwing them as well :)