gitea/services/doctor
Lunny Xiao d2e994db2c
Move git config/remote to gitrepo package and add global lock to resolve possible conflict when updating repository git config file (#35151)
Partially fix #32018 

`git config` and `git remote` write operations create a temporary file
named `config.lock`. Since these operations are not atomic, they must
not be run in parallel. If two requests attempt to modify the same
repository concurrently—such as during a compare operation—one may fail
due to the presence of an existing `config.lock` file.

In cases where `config.lock` is left behind due to an unexpected program
exit, a global lock mechanism could allow us to safely remove the stale
lock file when a related error is detected. While this behavior is not
yet implemented in this PR, it is planned for a future enhancement.

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-09-01 18:47:04 +07:00
..
actions.go Do not mutate incoming options to SearchRepositoryByName (#34553) 2025-06-02 17:33:25 +07:00
authorizedkeys.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +07:00
breaking.go
checkOldArchives.go
dbconsistency.go Fix doctor deleting orphaned issues attachments (#34142) 2025-05-30 05:06:03 +07:00
dbconsistency_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +07:00
dbversion.go Add global lock for migrations to make upgrade more safe with multiple replications (#33706) 2025-03-07 21:08:53 +07:00
doctor.go Fix context usages (#35348) 2025-08-27 11:00:01 +07:00
fix8312.go Move team related functions to service layer (#32537) 2024-11-27 21:12:26 +07:00
fix16961.go Fix panic for `fixBrokenRepoUnits16961` (#30068) 2024-03-26 14:45:11 +07:00
fix16961_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 +07:00
heads.go Remove context from git struct (#33793) 2025-03-04 11:56:11 +07:00
lfs.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +07:00
main_test.go Fix oauth2 builtin application logic (#30304) 2024-04-08 04:13:34 +07:00
mergebase.go Rename pull request GetGitRefName to GetGitHeadRefName (#35093) 2025-07-16 21:33:33 +07:00
misc.go Move git config/remote to gitrepo package and add global lock to resolve possible conflict when updating repository git config file (#35151) 2025-09-01 18:47:04 +07:00
paths.go enforce explanation for necessary nolints and fix bugs (#34883) 2025-06-27 21:48:03 +07:00
repository.go Remove unused param `doer` (#34545) 2025-06-18 03:12:16 +07:00
storage.go add additional ReplaceAll in pathsep to cater for different pathsep (#34061) 2025-03-30 12:46:28 +07:00
usertype.go