Sort commits by date in descending order

Commit day could be in the past compared to push day (e.g. when rebase
took place). This leads to invalid order of days in /commits and
/commits/search routes. This patch sorts categorized commits so that order
is always descending.
This commit is contained in:
Mike Gelfand
2014-05-15 12:41:55 +03:00
parent ff951124b6
commit 644a356306

View File

@@ -44,6 +44,8 @@ class CommitController implements ControllerProviderInterface
$categorized[$date][] = $commit;
}
krsort($categorized);
$template = $app['request']->isXmlHttpRequest() ? 'commits_list.twig' : 'commits.twig';
return $app['twig']->render($template, array(
@@ -74,6 +76,8 @@ class CommitController implements ControllerProviderInterface
$categorized[$date][] = $commit;
}
krsort($categorized);
return $app['twig']->render('searchcommits.twig', array(
'repo' => $repo,
'branch' => $branch,