1
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-04-29 20:25:17 +00:00
gitea/models/git
Lunny Xiao a100ac3306
Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed ()
Fix  

To make the resources will be cleanup once failed. All repository
operations now follow a consistent pattern:

- 1. Create a database record for the repository with the status
being_migrated.
- 2. Register a deferred cleanup function to delete the repository and
its related data if the operation fails.
- 3.	Perform the actual Git and database operations step by step.
- 4. Upon successful completion, update the repository’s status to
ready.

The adopt operation is a special case — if it fails, the repository on
disk should not be deleted.
2025-04-07 22:12:54 -07:00
..
branch_list.go Fix branch order () 2024-05-31 09:58:41 +08:00
branch_test.go Enable testifylint rules () 2025-03-31 01:53:48 -04:00
branch.go Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed () 2025-04-07 22:12:54 -07:00
commit_status_summary.go Fix commitstatus summary () 2024-04-14 14:16:54 +02:00
commit_status_test.go Enable tenv and testifylint rules () 2024-12-15 10:41:29 +00:00
commit_status.go Enable addtional linters () 2025-04-01 10:14:01 +00:00
lfs_lock_list.go Show lock owner instead of repo owner on LFS setting page () 2024-08-11 14:48:20 +00:00
lfs_lock.go Show lock owner instead of repo owner on LFS setting page () 2024-08-11 14:48:20 +00:00
lfs.go refactor: remove redundant err declarations () 2024-10-30 19:36:24 +00:00
main_test.go
protected_branch_list_test.go Enable testifylint rules () 2025-03-31 01:53:48 -04:00
protected_branch_list.go Add priority to protected branch () 2024-11-27 05:41:06 +01:00
protected_branch_test.go Enable testifylint rules () 2025-03-31 01:53:48 -04:00
protected_branch.go Add priority to protected branch () 2024-11-27 05:41:06 +01:00
protected_tag_test.go
protected_tag.go Add tag protection via rest api () 2024-06-14 18:56:10 +02:00