You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/web
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>
2 years ago
..
admin Sync branches into databases (#22743) 2 years ago
auth Use JSON response for "user/logout" (#25522) 2 years ago
devtest Change form actions to fetch for submit review box (#25219) 2 years ago
events Implement FSFE REUSE for golang files (#21840) 2 years ago
explore Split lfs size from repository size (#22900) 2 years ago
feed Pass 'not' to commit count (#24473) 2 years ago
healthcheck Refactor `setting.Database.UseXXX` to methods (#23354) 2 years ago
misc Decouple the different contexts from each other (#24786) 2 years ago
org Improve loadprojects for issue list (#25468) 2 years ago
repo Sync branches into databases (#22743) 2 years ago
shared Support configuration variables on Gitea Actions (#24724) 2 years ago
user Refactor indexer (#25174) 2 years ago
auth.go Implement FSFE REUSE for golang files (#21840) 2 years ago
auth_windows.go Implement FSFE REUSE for golang files (#21840) 2 years ago
base.go Fix all possible setting error related storages and added some tests (#23911) 2 years ago
goget.go Support SSH for go get (#24664) 2 years ago
home.go Refactor cookie (#24107) 2 years ago
metrics.go Implement FSFE REUSE for golang files (#21840) 2 years ago
nodeinfo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
swagger_json.go Group template helper functions, remove `Printf`, improve template error messages (#23982) 2 years ago
web.go Support downloading raw task logs (#24451) 2 years ago
webfinger.go Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) 2 years ago