Fixing bugged branch browsing. Fixes #11 and #12

This commit is contained in:
Klaus Silveira
2012-05-23 21:08:54 -03:00
parent 9c4b5e9f35
commit 8b8c2aa71e
3 changed files with 4 additions and 4 deletions

View File

@@ -3,7 +3,7 @@
$app->get('{repo}/commits/{branch}', function($repo, $branch) use($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo);
$pager = $app['utils']->getPager($app['request']->get('page'), $repository->getTotalCommits());
$commits = $repository->getCommits(null, $pager['current']);
$commits = $repository->getCommits($branch, $pager['current']);
foreach ($commits as $commit) {
$date = $commit->getDate();

View File

@@ -2,7 +2,7 @@
$app->get('{repo}/{branch}/rss/', function($repo, $branch) use($app) {
$repository = $app['git']->getRepository($app['git.repos'] . $repo);
$commits = $repository->getCommits();
$commits = $repository->getCommits($branch);
$html = $app['twig']->render('rss.twig', array(
'baseurl' => $app['baseurl'],

View File

@@ -1,5 +1,5 @@
<ul class="nav nav-tabs">
<li{% if page == 'files' %} class="active"{% endif %}><a href="{{ baseurl }}/{{ repo }}/tree/{{ branch }}">Files</a></li>
<li{% if page == 'commits' %} class="active"{% endif %}><a href="{{ baseurl }}/{{ repo }}/commits">Commits</a></li>
<li{% if page == 'stats' %} class="active"{% endif %}><a href="{{ baseurl }}/{{ repo }}/stats">Stats</a></li>
<li{% if page == 'commits' %} class="active"{% endif %}><a href="{{ baseurl }}/{{ repo }}/commits/{{ branch }}">Commits</a></li>
<li{% if page == 'stats' %} class="active"{% endif %}><a href="{{ baseurl }}/{{ repo }}/stats/{{ branch }}">Stats</a></li>
</ul>