public function run($verbose = false)
{
if ($verbose !== false) {
printf("Fetching %s ...\n", $this->source);
}
$local = new Tempdir("gitclone");
$cmd = new ExecCmd("git", $verbose);
if (strlen($this->branch)) {
$cmd->run(["clone", "--depth", 1, "--branch", $this->branch, $this->source, $local]);
} else {
$cmd->run(["clone", $this->source, $local]);
}
return $local;
}