Skip to content

Reduce the size of the clone for people who just build rustc from source #30653

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

Closed
wants to merge 1 commit into from

Conversation

dns2utf8
Copy link
Contributor

This speeds up the download process for the user.

Tested on armhf and amd64.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@steveklabnik
Copy link
Member

It does, but it also has downsides as well. You can't do all the stuff you can do with a 'real' checkout.

@tomjakubowski
Copy link
Contributor

It does, but it also has downsides as well. You can't do all the stuff you can do with a 'real' checkout.

At one point shallow clones were pretty broken compared to 'real' clones (you couldn't push/pull from/to shallow clones, for example), but the situation is much better as of git 2.0. See git/git@82fba2b and https://blog.oio.de/2014/02/06/better-support-for-shallow-clones-in-git-1-9/

Of course, with a shallow clone one's options for digging through history are limited. But for someone who just wants to build, that may not be a big deal.

My personal preference is to leave --depth out, though. Not everyone is on git 2.0 and the Rust README hardly seems like the right place for git education ;-)

@MagaTailor
Copy link

This change is almost useless because the heaviest submodules are still going to be cloned later even when they're not needed. Because of that it's completely harmless though.

Here's the main issue to solve:
#30107

@brson
Copy link
Contributor

brson commented Jan 5, 2016

I also have reservations about this. Knowledgeable developers will know this is an option. And as @petevine says you're still going to end up cloning LLVM.

@dns2utf8
Copy link
Contributor Author

dns2utf8 commented Jan 7, 2016

I agree.

I tried a reduced clone of llvm and the submodules, but it did not work anymore.

So close?

@alexcrichton
Copy link
Member

Ah yeah I'm going to close this for the aforementioned reasons. Thanks for the PR regardless though!

@dns2utf8 dns2utf8 deleted the smaller_download branch May 16, 2016 14:26
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.

7 participants