0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-27 20:24:38 +01:00
gitea/routers/api/v1
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
..
activitypub
admin
misc Refactor web package and context package (#25298) 2023-06-18 09:59:09 +02:00
notify Fix bugs related to notification endpoints (#25548) 2023-06-28 10:26:56 -04:00
org Fix Permission in API returned repository struct (#25388) 2023-06-22 13:08:08 +00:00
packages
repo Sync branches into databases (#22743) 2023-06-29 10:03:20 +00:00
settings
swagger API endpoint for changing/creating/deleting multiple files (#24887) 2023-05-29 17:41:35 +08:00
user Fix Permission in API returned repository struct (#25388) 2023-06-22 13:08:08 +00:00
utils New webhook trigger for receiving Pull Request review requests (#24481) 2023-05-24 22:06:27 -04:00
api.go Fix bugs related to notification endpoints (#25548) 2023-06-28 10:26:56 -04:00
auth.go
auth_windows.go