mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-10-24 17:25:19 +08: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