gitea/modules/git
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
..
attribute Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
foreachref Allow foreachref parser to grow its buffer (#35365) 2025-08-28 10:18:54 +00:00
internal
languagestats Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
pipeline
tests/repos
url
batch_reader.go
batch.go
blame_sha256_test.go
blame_test.go
blame.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
blob_gogit.go
blob_nogogit.go
blob_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
blob.go Add support for 3D/CAD file formats preview (#34794) 2025-06-30 16:12:25 +08:00
cmdverb.go
command_race_test.go
command_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
command.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
commit_convert_gogit.go
commit_info_gogit.go Fix repo file list partial reloading for submodules (#35183) 2025-07-31 09:34:51 +08:00
commit_info_nogogit.go Fix repo file list partial reloading for submodules (#35183) 2025-07-31 09:34:51 +08:00
commit_info_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
commit_info.go Fix repo file list partial reloading for submodules (#35183) 2025-07-31 09:34:51 +08:00
commit_reader.go
commit_sha256_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
commit_submodule_file_test.go Fix various bugs (#35177) 2025-07-30 07:08:59 +00:00
commit_submodule_file.go Fix various bugs (#35177) 2025-07-30 07:08:59 +00:00
commit_submodule.go Fix submodule nil check (#35096) 2025-07-16 12:07:38 +00:00
commit_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
commit.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
config_submodule_test.go
config_submodule.go
config_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
config.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
diff_test.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
diff.go Fix incorrect comment diff hunk parsing, fix github asset ID nil panic (#35046) 2025-07-11 15:18:41 -07:00
error.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
fsck.go
git_test.go Fix context usages (#35348) 2025-08-27 11:00:01 +00:00
git.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
grep_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
grep.go
hook.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
key.go
last_commit_cache_gogit.go
last_commit_cache_nogogit.go
last_commit_cache.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
log_name_status.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
notes_gogit.go
notes_nogogit.go
notes_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
notes.go
object_format.go
object_id_gogit.go
object_id_test.go
object_id.go
parse_gogit_test.go
parse_gogit.go
parse_nogogit_test.go
parse_nogogit.go
parse.go
README.md
ref_test.go
ref.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
remote.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
repo_archive_test.go
repo_archive.go
repo_base_gogit.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_base_nogogit.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_blame.go
repo_blob_gogit.go
repo_blob_nogogit.go
repo_blob_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_blob.go
repo_branch_gogit.go
repo_branch_nogogit.go
repo_branch_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_branch.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
repo_commit_gogit.go
repo_commit_nogogit.go
repo_commit_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_commit.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
repo_commitgraph_gogit.go
repo_commitgraph.go
repo_compare_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_compare.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
repo_gpg.go
repo_hook.go
repo_index.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
repo_object.go
repo_ref_gogit.go
repo_ref_nogogit.go
repo_ref_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_ref.go
repo_stats_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_stats.go
repo_tag_gogit.go Remove the duplicated function GetTags (#35375) 2025-08-29 01:11:42 +00:00
repo_tag_nogogit.go Remove the duplicated function GetTags (#35375) 2025-08-29 01:11:42 +00:00
repo_tag_test.go Remove the duplicated function GetTags (#35375) 2025-08-29 01:11:42 +00:00
repo_tag.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
repo_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
repo_tree_gogit.go
repo_tree_nogogit.go
repo_tree.go
repo.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
signature_gogit.go
signature_nogogit.go
signature_test.go
signature.go
submodule_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
submodule.go
tag_test.go
tag.go
tree_blob_gogit.go
tree_blob_nogogit.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_blob.go
tree_entry_common_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
tree_entry_gogit.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_entry_mode.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_entry_nogogit.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_entry_test.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_entry.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_gogit.go Follow file symlinks in the UI to their target (#28835) 2025-07-01 06:55:36 +08:00
tree_nogogit.go
tree_test.go Remove wrong "git.DefaultContext" (#35364) 2025-08-27 16:31:21 +00:00
tree.go Run gopls modernize on codebase (#34751) 2025-06-18 01:48:09 +00:00
utils_test.go Fix various bugs (#35177) 2025-07-30 07:08:59 +00:00
utils.go Fix various bugs (#35177) 2025-07-30 07:08:59 +00:00

Git Module

This module is merged from https://github.com/go-gitea/git which is a Go module to access Git through shell commands. Now it's a part of gitea's main repository for easier pull request.