aboutsummaryrefslogtreecommitdiffstats
path: root/models/db/search.go
diff options
context:
space:
mode:
authora1012112796 <1012112796@qq.com>2023-06-29 06:41:02 +0800
committerGitHub <noreply@github.com>2023-06-28 22:41:02 +0000
commit4aba8a6a5ff96f0995ada7e183c7864f8f5bc05c (patch)
treed3fc062a47fbbe8faccc347af2d0aff84078e872 /models/db/search.go
parent953884236454e6e6a9e23dac21b8a4c124689723 (diff)
downloadgitea-4aba8a6a5ff96f0995ada7e183c7864f8f5bc05c.tar.gz
gitea-4aba8a6a5ff96f0995ada7e183c7864f8f5bc05c.zip
Split lfs size from repository size (#22900)
releated to #21820 - Split `Size` in repository table as two new colunms, one is `GitSize` for git size, the other is `LFSSize` for lfs data. still store full size in `Size` colunm. - Show full size on ui, but show each of them by a `title`; example: ![image](https://user-images.githubusercontent.com/25342410/218636251-e200f085-d7e7-4a25-9ff1-b586a63e07a9.png) - Return full size in api response. --------- Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: DmitryFrolovTri <23313323+DmitryFrolovTri@users.noreply.github.com> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'models/db/search.go')
-rw-r--r--models/db/search.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/models/db/search.go b/models/db/search.go
index 105cb64c41..aa577f08e0 100644
--- a/models/db/search.go
+++ b/models/db/search.go
@@ -20,6 +20,10 @@ const (
SearchOrderByNewest SearchOrderBy = "created_unix DESC"
SearchOrderBySize SearchOrderBy = "size ASC"
SearchOrderBySizeReverse SearchOrderBy = "size DESC"
+ SearchOrderByGitSize SearchOrderBy = "git_size ASC"
+ SearchOrderByGitSizeReverse SearchOrderBy = "git_size DESC"
+ SearchOrderByLFSSize SearchOrderBy = "lfs_size ASC"
+ SearchOrderByLFSSizeReverse SearchOrderBy = "lfs_size DESC"
SearchOrderByID SearchOrderBy = "id ASC"
SearchOrderByIDReverse SearchOrderBy = "id DESC"
SearchOrderByStars SearchOrderBy = "num_stars ASC"