mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user