diff --git a/src/LocalMirror.php b/src/LocalMirror.php index a6a41fd..e2972a2 100644 --- a/src/LocalMirror.php +++ b/src/LocalMirror.php @@ -126,8 +126,8 @@ class LocalMirror { $child_repos = []; foreach(SuperProject::readSubmoduleConfig($dst_dir) as $name => $values) { - if (empty($values['path']) { throw \RuntimeException("Missing path."); - if (empty($values['url']) { throw \RuntimeException("Missing URL."); + if (empty($values['path'])) { throw \RuntimeException("Missing path."); } + if (empty($values['url'])) { throw \RuntimeException("Missing URL."); } $child_repos[$values['path']] = self::resolveGithubUrl($values['url'], $repo); } diff --git a/src/SuperProject.php b/src/SuperProject.php index 89c2779..6653166 100644 --- a/src/SuperProject.php +++ b/src/SuperProject.php @@ -176,8 +176,10 @@ class SuperProject extends Repo { * @return Array */ static function currentHashes($repo_path, $paths, $ref = 'HEAD') { - $matches = null; $hashes = Array(); + if (!$paths) { return $hashes; } + + $matches = null; foreach (Process::read_lines( "git ls-tree {$ref} ". implode(' ', $paths), $repo_path) as $line)