gitea/modules/templates
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 +00:00
..
eval Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
scopedtmpl enforce explanation for necessary nolints and fix bugs (#34883) 2025-06-27 21:48:03 +08:00
vars Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
base.go Replace util.SliceXxx with slices.Xxx (#26958) 2023-09-07 09:37:47 +00:00
helper_test.go Improve OAuth2 provider (correct Issuer, respect ENABLED) (#34966) 2025-07-06 13:36:45 +08:00
helper.go Improve OAuth2 provider (correct Issuer, respect ENABLED) (#34966) 2025-07-06 13:36:45 +08:00
htmlrenderer_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
htmlrenderer.go enforce explanation for necessary nolints and fix bugs (#34883) 2025-06-27 21:48:03 +08:00
mailer.go Refactor mail template and support preview (#34990) 2025-07-09 10:25:25 +08:00
templates_bindata.go Refactor embedded assets and drop unnecessary dependencies (#34692) 2025-06-12 03:59:33 +00:00
templates_dynamic.go Refactor embedded assets and drop unnecessary dependencies (#34692) 2025-06-12 03:59:33 +00:00
util_avatar.go Fix various trivial frontend problems (#34263) 2025-04-24 09:11:54 +08:00
util_date_test.go Remove legacy template helper functions (#34426) 2025-05-11 01:42:21 -04:00
util_date.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
util_dict.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
util_format_test.go Fix some overflows in test (#35315) 2025-08-20 15:20:22 +00:00
util_format.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
util_json.go enforce nolint scope (#34851) 2025-06-27 07:59:55 +02:00
util_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 +00:00
util_render_test.go Improve labels-list rendering (#34846) 2025-06-27 23:12:25 +08:00
util_render.go Improve labels-list rendering (#34846) 2025-06-27 23:12:25 +08:00
util_slice.go Improve template helper functions: string/slice (#24266) 2023-04-22 14:16:22 -04:00
util_string.go Refactor "string truncate" (#32984) 2024-12-26 11:56:03 +08:00
util_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00