lightbend-labs / dbuild

Multi-project build tool, based on sbt.
https://lightbend-labs.github.io/dbuild
Other
83 stars 14 forks source link

support shallow cloning of repositories? #209

Closed SethTisue closed 6 years ago

SethTisue commented 6 years ago

git clone --depth=1 can save a lot of time (and bandwidth and disk space) if you don't need the history. could dbuild support this as an option...?

for example, the akka/akka repository clones about 10x faster this way

cunei commented 6 years ago

Hi @SethTisue, in principle dbuild does not need to re-clone the remote repository each time: there is a single local clone that is just updated at every run. The other clones take place on the local file systems, and are made very efficiently using hard links. Unless you deliberately delete the master clone (which is in a subdirectory of the clones-0.9.12 directory), each run should have no need to clone the remote from scratch. A more detailed description is available here: https://github.com/lightbend/dbuild/issues/171#issuecomment-119769616 (and the rest of https://github.com/lightbend/dbuild/issues/171)

SethTisue commented 6 years ago

I guess I encountered an unusual set of circumstances:

but yeah, now that I think about it some more, this probably isn't worth doing.