mad
mad copied to clipboard
Downloading dependencies
I don't like cloning a repository while I just need the code not its whole history, so GitHub archives come in handy. I think downloading archives (in an optional manner) is better than cloning repositories, so git, mercurial or whatever can no longer be required.
Any thoughts on this?
If you're going to rely on just Github archives you've lost any code that's not on Github. As an end-user, I'd prefer the ability to clone a project at a given commit and, optionally, have the ability to specify a tarball URL.
Why not best of both worlds, git clone --depth 1
Oh, didn't think of that. I like that too.
@blt Absolutely, that's why I said in an optional manner, further, in a possible form. GitHub allows us to download a tarball at a specific commit/branch/tag, but about other hostings, making an archive builder can be useful.
@tsloughter that's pretty cool, but not efficient when a commit is specified, right?
Using an archive seems reasonable if you are pulling a tag. Otherwise, I think you really want the SHA available so you know what you have.
So perhaps that's a +1 to git clone --depth 1
?
Aha, right.
Yes, +1 to git clone --depth
but I'm not sure if it can work with a specific branch or not.
What do you mean? You can get a specific branch the same way you would before: git clone <repo> --depth 1 --branch <branch>
Oh, yes, that's it.