summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-09-19 11:37:03 +0300
committerGitHub <noreply@github.com>2017-09-19 11:37:03 +0300
commit23645fe05f16b44c1d430c165fd0c2839e518eee (patch)
treea0540625123b996edbe6a389ee578fadc3dfa236 /routers
parent4cb9394a978af75794d43accc231b6649f2884bc (diff)
downloadgitea-23645fe05f16b44c1d430c165fd0c2839e518eee.tar.gz
gitea-23645fe05f16b44c1d430c165fd0c2839e518eee.zip
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
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/view.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/view.go b/routers/repo/view.go
index 991d2c0400..d794a57405 100644
--- a/routers/repo/view.go
+++ b/routers/repo/view.go
@@ -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 {