0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-25 17:04:12 -05:00
forgejo/routers/web/admin
Lunny Xiao 6e19484f4d
Sync branches into databases (#22743)
Related #14180
Related #25233 
Related #22639
Close #19786
Related #12763 

This PR will change all the branches retrieve method from reading git
data to read database to reduce git read operations.

- [x] Sync git branches information into database when push git data
- [x] Create a new table `Branch`, merge some columns of `DeletedBranch`
into `Branch` table and drop the table `DeletedBranch`.
- [x] Read `Branch` table when visit `code` -> `branch` page
- [x] Read `Branch` table when list branch names in `code` page dropdown
- [x] Read `Branch` table when list git ref compare page
- [x] Provide a button in admin page to manually sync all branches.
- [x] Sync branches if repository is not empty but database branches are
empty when visiting pages with branches list
- [x] Use `commit_time desc` as the default FindBranch order by to keep
consistent as before and deleted branches will be always at the end.

---------

Co-authored-by: Jason Song <i@wolfogre.com>
2023-06-29 10:03:20 +00:00
..
admin.go Sync branches into databases (#22743) 2023-06-29 10:03:20 +00:00
admin_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
applications.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
auths.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
config.go Refactor path & config system (#25330) 2023-06-21 13:50:26 +08:00
diagnosis.go Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
emails.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
hooks.go Add main landmark to templates and adjust titles (#22670) 2023-02-01 22:56:10 +00:00
main_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
notice.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
orgs.go Sort users and orgs on explore by recency by default (#24279) 2023-05-06 22:04:55 +08:00
packages.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
queue.go Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
queue_tester.go Improve queue and logger context (#24924) 2023-05-26 07:31:55 +00:00
repos.go Fix unclear IsRepositoryExist logic (#24374) 2023-04-28 14:14:26 -04:00
runners.go Move secrets and runners settings to actions settings (#24200) 2023-04-27 20:08:47 -04:00
stacktrace.go Improve queue & process & stacktrace (#24636) 2023-05-11 07:45:47 +00:00
users.go Split "modules/context.go" to separate files (#24569) 2023-05-08 17:36:54 +08:00
users_test.go Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00