0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-20 21:06:00 -05:00
forgejo/models/repo
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
..
TestSearchRepositoryIDsByCondition fix: anomynous users code search for private/limited user's repository 2024-11-15 10:59:36 +01:00
archive_download_count.go chore: fix typos, decap a few i18n strings (#6666) 2025-01-24 05:41:59 +00:00
archive_download_count_test.go
archiver.go
attachment.go
attachment_test.go
avatar.go
collaboration.go
collaboration_test.go
following_repo.go
following_repo_test.go
fork.go fix: don't show private forks in forks list 2024-11-15 10:59:36 +01:00
fork_test.go
git.go feat: allow changing default branch update style 2024-12-23 18:55:25 +03:00
issue.go
language_stats.go chore: remove usages of sort.Sort (#6689) 2025-01-26 13:30:00 +00:00
language_stats_test.go chore: remove usages of sort.Sort (#6689) 2025-01-26 13:30:00 +00:00
main_test.go tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
mirror.go
pushmirror.go [FEAT] Allow pushmirror to use publickey authentication 2024-08-22 17:05:07 +02:00
pushmirror_test.go [FEAT] Allow pushmirror to use publickey authentication 2024-08-22 17:05:07 +02:00
redirect.go
redirect_test.go
release.go Fix typos 2024-12-28 21:20:55 +01:00
release_test.go Update 2024-12-30 17:47:34 +01:00
repo.go feat: Add summary card for repos and releases 2024-12-14 19:36:09 +01:00
repo_flags.go
repo_flags_test.go
repo_indexer.go
repo_list.go chore: remove usages of sort.Sort (#6689) 2025-01-26 13:30:00 +00:00
repo_list_test.go fix: anomynous users code search for private/limited user's repository 2024-11-15 10:59:36 +01:00
repo_repository.go
repo_test.go
repo_unit.go feat: allow changing default branch update style 2024-12-23 18:55:25 +03:00
repo_unit_test.go feat: allow changing default branch update style 2024-12-23 18:55:25 +03:00
search.go fix: Add recentupdated as recognized sort option 2024-10-19 23:53:29 +02:00
star.go
star_test.go
topic.go
topic_test.go
update.go
upload.go
user_repo.go Only query team tables if repository is under org when getting assignees (#32414) 2024-11-16 14:57:11 +01:00
user_repo_test.go
watch.go
watch_test.go
wiki.go
wiki_test.go