1
0
Fork 0

Simplify check

pull/311/head
Jordi Boggiano 2012-02-18 12:12:02 +01:00
parent f152fe723d
commit fa8cb14073
1 changed files with 2 additions and 2 deletions

View File

@ -172,8 +172,8 @@ class GitDriver extends VcsDriver implements VcsDriverInterface
// local filesystem
if (preg_match('{^(file://|/|[a-z]:[\\\\/])}', $url)) {
$process = new ProcessExecutor();
$process->execute(sprintf('cd %s && git log -1 --format=%%at', escapeshellarg($url)), $output);
if (is_numeric(trim($output))) {
// check whether there is a git repo in that path
if ($process->execute(sprintf('cd %s && git show', escapeshellarg($url)), $output) === 0) {
return true;
}
}