mad icon indicating copy to clipboard operation
mad copied to clipboard

Downloading dependencies

Open sinasamavati opened this issue 11 years ago • 8 comments

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?

sinasamavati avatar Dec 29 '13 21:12 sinasamavati

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.

blt avatar Dec 29 '13 23:12 blt

Why not best of both worlds, git clone --depth 1

tsloughter avatar Dec 29 '13 23:12 tsloughter

Oh, didn't think of that. I like that too.

blt avatar Dec 29 '13 23:12 blt

@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?

sinasamavati avatar Dec 29 '13 23:12 sinasamavati

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?

seth avatar Dec 30 '13 06:12 seth

Aha, right.

Yes, +1 to git clone --depth but I'm not sure if it can work with a specific branch or not.

sinasamavati avatar Dec 30 '13 11:12 sinasamavati

What do you mean? You can get a specific branch the same way you would before: git clone <repo> --depth 1 --branch <branch>

tsloughter avatar Dec 30 '13 15:12 tsloughter

Oh, yes, that's it.

sinasamavati avatar Dec 30 '13 15:12 sinasamavati