forgejo/models/git
Lunny Xiao 6e19484f4d
Sync branches into databases ()
Related 
Related  
Related 
Close 
Related  

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
..
branch.go Sync branches into databases () 2023-06-29 10:03:20 +00:00
branch_list.go Sync branches into databases () 2023-06-29 10:03:20 +00:00
branch_test.go Sync branches into databases () 2023-06-29 10:03:20 +00:00
commit_status.go Fix index generation parallelly failure () 2023-06-15 02:14:43 +02:00
commit_status_test.go Use context parameter in models/git () 2023-01-09 11:50:54 +08:00
lfs.go Fix missed table name on iterate lfs meta objects () 2023-05-17 23:51:22 +08:00
lfs_lock.go Introduce path Clean/Join helper functions () 2023-03-21 16:02:49 -04:00
main_test.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
protected_banch_list_test.go Fix branch protection priority () 2023-04-11 13:22:49 -04:00
protected_branch.go Rename repo.GetOwner to repo.LoadOwner () 2023-02-18 20:11:03 +08:00
protected_branch_list.go Sync branches into databases () 2023-06-29 10:03:20 +00:00
protected_branch_test.go Supports wildcard protected branch () 2023-01-16 16:00:22 +08:00
protected_tag.go Use context parameter in models/git () 2023-01-09 11:50:54 +08:00
protected_tag_test.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00