Consider using shallow clone during install to save time
Cloning all of el-get takes a while. Maybe if doing a shallow clone is significantly faster, we should do that by default in the installer. This would make things friendlier for new users who won't have to wait as long before experimenting with el-get.
Good idea.
I just tested it, and it saves a good bit of data.
The drawback is, of course, that the shallow clone option is fairly new, and we can't necessarily count on everyone having an up-to-date version of git, so maybe we should wait a while before doing this (like until shallow clones trickle down into debian stable's git version).
Is there a way to discover its availability at run time?
Other than the "duck typing" approach, I don't think so. I guess you could grep the man page or something, but that's fragile.
Why not just try to checkout the repo with a shallow clone and then check the return value. If it is different from 0 then try it without --depth.
That would be the "duck typing" approach.
How about git --version? But the "duck typing" approach is easier I guess.
I'm voting for duck typing. Which is the first git version to include shallow clones?
According to the git logs (emphasis mine):
[git/git@f4bf2184ae8b79f95b9f56c1ea5455d04e559299] [email protected], 6 years ago: Update clone/fetch documentation with --depth (shallow clone) option
Should be pretty safe to assume shallow clone is available.
So that would be 1.5.0.rc0.129.gf4bf2.
We could maybe try it in the master branch only without any test whatsoever and wait for people to complain. Without any such feedback we could maybe think about keeping it that way in the next stable? Or we could insist on the installer being prepared to deal with more than 6 years old dependencies... In any case, let's just install a shallow clone installer version in master only and see what happens.
@DarwinAwardWinner, what do you think?