mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Sort repository tree entries in natural way (#2506)
* Sort repository tree entries in natural way * Fix sort for different length strings with first parts equal * Improve test case * Refactor return statements * Update gitea/git dependency
This commit is contained in:
parent
4cb9394a97
commit
23645fe05f
5 changed files with 145 additions and 16 deletions
|
@ -47,7 +47,7 @@ func renderDirectory(ctx *context.Context, treeLink string) {
|
|||
ctx.Handle(500, "ListEntries", err)
|
||||
return
|
||||
}
|
||||
entries.Sort()
|
||||
entries.CustomSort(base.NaturalSortLess)
|
||||
|
||||
ctx.Data["Files"], err = entries.GetCommitsInfo(ctx.Repo.Commit, ctx.Repo.TreePath)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue