rust-lang/cargo — pull request #549 by alexcrichton (2014-09-10 14:48:47+00:00)
Title: Don't blow away checked out git repos

This primarily blows away all *submodules* as well, which sometimes can be quite
large and take some time to update. Instead, re-use an existing checkout, just
reset it to the right revision if possible.

Also, move the submodule update step to occur unconditionally to account for
corrupt submodule checkouts or interrupted downloads. This update step should be
much faster than `git submodule update` because we're using libgit2, so yay!