-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"cargo clone" to check out a crate's repo #1545
Comments
Cargo packages don't necessarily have a corresponding git (or any other) repository. The repository metadata doesn't even include the VCS right now. |
They frequently do, though, and crates.io displays it. |
That's an arbitrary string, it doesn't even need to be a URL. |
Sounds like you Servo guys would definitely like this for when you're doing a Rust upgrade and upgrading all of your crates. The workflow Lars and I just talked about in theory looks like:
This may be good to be an external subcommand to start out, but As a side note, |
It's not yet feature complete, but you might find it useful. https://github.com/JanLikar/cargo-clone |
Is the plan still to merge cargo-clone into cargo? |
@davidzchen certainly yeah! We're always open to folding in new subcommands that have clearly proven themselves. For example that's sort of what we did with |
Is this still relevant and nobody is going to tackle this? |
@dethoter yep, this is still relevant! |
Thank you. I'm on it |
@joshtriplett I made a little command to clone a package: https://github.com/ehuss/cargo-clone-crate It does some heuristics to guess which VCS to use, but since most people use github or gitlab, it normally is correct. It even checks whether it is git or hg for bitbucket. 😄 |
Nowadays this probably requires an RFC to land in cargo proper. |
I'd love to write something like "cargo clone byteorder" to clone a copy of the corresponding git repository.
The text was updated successfully, but these errors were encountered: