public static function findRepositoryRoot($path) { return FileSystem::bubble($path, function ($p) { $gitDir = $p . '/' . '.git'; return file_exists($gitDir) && is_dir($gitDir); }); }