1
0
Fork 0

Merge pull request #705 from stof/support_local_repo

Support local repo
pull/706/head
Nils Adermann 2012-05-17 06:33:07 -07:00
commit bac9d6d2e7
1 changed files with 2 additions and 1 deletions

View File

@ -181,13 +181,14 @@ class GitDriver extends VcsDriver
*/ */
public static function supports(IOInterface $io, $url, $deep = false) public static function supports(IOInterface $io, $url, $deep = false)
{ {
if (preg_match('#(^file://|^git://|\.git$|git@|//git\.|//github.com/)#i', $url)) { if (preg_match('#(^git://|\.git$|git@|//git\.|//github.com/)#i', $url)) {
return true; return true;
} }
// local filesystem // local filesystem
if (static::isLocalUrl($url)) { if (static::isLocalUrl($url)) {
$process = new ProcessExecutor(); $process = new ProcessExecutor();
$url = str_replace('file://', '', $url);
// check whether there is a git repo in that path // check whether there is a git repo in that path
if ($process->execute('git tag', $output, $url) === 0) { if ($process->execute('git tag', $output, $url) === 0) {
return true; return true;