diff options
author | Lauris BH <lauris@nix.lv> | 2017-09-19 11:37:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-19 11:37:03 +0300 |
commit | 23645fe05f16b44c1d430c165fd0c2839e518eee (patch) | |
tree | a0540625123b996edbe6a389ee578fadc3dfa236 /routers/repo/view.go | |
parent | 4cb9394a978af75794d43accc231b6649f2884bc (diff) | |
download | gitea-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/repo/view.go')
-rw-r--r-- | routers/repo/view.go | 2 |
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 { |