mirror of
https://github.com/klaussilveira/gitlist.git
synced 2026-04-12 23:47:56 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user