1
0
Fork 0

Workaround for checking out branch whose names are missing the origin/ prefix

pull/163/head
Jordi Boggiano 2011-12-18 20:32:26 +01:00
parent b1f528fb06
commit 10c94c5ba4
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class GitDownloader implements DownloaderInterface
$url = escapeshellarg($package->getSourceUrl());
$ref = escapeshellarg($package->getSourceReference());
system(sprintf('git clone %s %s && cd %2$s && git reset --hard %s', $url, $path, $ref));
system(sprintf('git clone %s %s && cd %2$s && git checkout %3$s && git reset --hard %3$s', $url, $path, $ref));
}
/**
@ -51,7 +51,7 @@ class GitDownloader implements DownloaderInterface
}
$this->enforceCleanDirectory($path);
system(sprintf('cd %s && git fetch && git reset --hard %s', $path, $target->getSourceReference()));
system(sprintf('cd %s && git fetch && git checkout %2$s && git reset --hard %2$s', $path, $target->getSourceReference()));
}
/**