B:BD[
3.5669] → [
3.5669:5775]
B:BD[
3.5775] → [
2.1025:1208]
# TODO: Optimize the first clone by using "git init $clonePath" and "git remote add origin $uri".
$res = run(cmd => ["git", "clone", "--branch", $branch, $uri, $clonePath], timeout => 600);
die "error cloning git repo at `$uri':\n$res->{stderr}" if $res->{status};
$res = run(cmd => ["git", "init", $clonePath]);
$res = run(cmd => ["git", "remote", "add", "origin", "--", $uri], dir => $clonePath) unless $res->{status};
die "error creating git repo in `$clonePath':\n$res->{stderr}" if $res->{status};