1
0
Fork 0

Add support for local paths pointing directly at the .git folder instead of actual repo, refs #3338

pull/5243/head
Jordi Boggiano 2016-04-21 11:00:03 +01:00
parent c7c8335b8b
commit 766c45c047
1 changed files with 2 additions and 1 deletions

View File

@ -38,6 +38,7 @@ class GitDriver extends VcsDriver
public function initialize()
{
if (Filesystem::isLocalPath($this->url)) {
$this->url = preg_replace('{[\\/]\.git/?$}', '', $this->url);
$this->repoDir = $this->url;
$cacheUrl = realpath($this->url);
} else {
@ -219,7 +220,7 @@ class GitDriver extends VcsDriver
*/
public static function supports(IOInterface $io, Config $config, $url, $deep = false)
{
if (preg_match('#(^git://|\.git$|git(?:olite)?@|//git\.|//github.com/)#i', $url)) {
if (preg_match('#(^git://|\.git/?$|git(?:olite)?@|//git\.|//github.com/)#i', $url)) {
return true;
}