mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
Trying to make this a little better for readability
This commit is contained in:
@@ -7,10 +7,15 @@ $app->get('{repo}/{format}ball/{branch}', function($repo, $format, $branch) use(
|
||||
$tree = $repository->getBranchTree($branch);
|
||||
|
||||
if (false === $tree) {
|
||||
return $app->abort(404, 'Invalid commit or tree reference: '.$branch);
|
||||
return $app->abort(404, 'Invalid commit or tree reference: '. $branch);
|
||||
}
|
||||
|
||||
$file = $app['cache.archives'].DIRECTORY_SEPARATOR.$repo.DIRECTORY_SEPARATOR.substr($tree, 0, 2).DIRECTORY_SEPARATOR.substr($tree, 2).'.'.$format;
|
||||
$file = $app['cache.archives'] . DIRECTORY_SEPARATOR
|
||||
. $repo . DIRECTORY_SEPARATOR
|
||||
. substr($tree, 0, 2) . DIRECTORY_SEPARATOR
|
||||
. substr($tree, 2)
|
||||
. '.'
|
||||
. $format;
|
||||
|
||||
if (!file_exists($file)) {
|
||||
$repository->createArchive($tree, $file, $format);
|
||||
|
||||
Reference in New Issue
Block a user