0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-21 13:26:24 -05:00
forgejo/routers
Gusted 270a2c7fa3 chore: remove usages of sort.Sort (#6689)
improve language stats rounding:

- Add tests (I had to omit some edge cases as the current method is
non-determistic in some cases, due to random order of map access).
- Document the algorithm used.
- Lower the amount of calculations that need to be done.
- Because of the aforementioned non-determistic don't use stable sort
and instead regular sort.

better sorting for `RepositoryList`:

- Add testing
- Use `slices.Sortfunc` instead of `sort.Sort`.
- Remove the methods needed for `sort.Sort`.

better git tag sorter:

- Use `slices.SortFunc` instead of `sort.Sort`.
- Remove `tagSorter` and its related methods.
- Added testing.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6689
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-01-26 13:30:00 +00:00
..
api [gitea] week 2025-04 cherry pick (gitea/main -> forgejo) (#6623) 2025-01-26 08:43:07 +00:00
common feat: add limited execution tracing support 2025-01-05 04:07:49 +01:00
install
private
utils
web chore: remove usages of sort.Sort (#6689) 2025-01-26 13:30:00 +00:00
init.go