gitea/modules/git
Lunny Xiao ae0af8ea5b
Refactor Git Attribute & performance optimization (#34154)
This PR moved git attributes related code to `modules/git/attribute` sub
package and moved language stats related code to
`modules/git/languagestats` sub package to make it easier to maintain.

And it also introduced a performance improvement which use the `git
check-attr --source` which can be run in a bare git repository so that
we don't need to create a git index file. The new parameter need a git
version >= 2.40 . If git version less than 2.40, it will fall back to
previous implementation.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: yp05327 <576951401@qq.com>
2025-04-11 21:41:29 +08:00
..
attribute Refactor Git Attribute & performance optimization (#34154) 2025-04-11 21:41:29 +08:00
foreachref Use refname:strip-2 instead of refname:short when syncing tags (#28797) 2024-01-16 08:13:07 +01:00
internal Refactor git command package to improve security and maintainability (#22678) 2023-02-04 10:30:43 +08:00
languagestats Refactor Git Attribute & performance optimization (#34154) 2025-04-11 21:41:29 +08:00
pipeline Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
tests/repos Refactor Git Attribute & performance optimization (#34154) 2025-04-11 21:41:29 +08:00
url Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
batch_reader.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
batch.go Decouple Batch from git.Repository to simplify usage without requiring the creation of a Repository struct. (#34001) 2025-03-27 17:35:48 +00:00
blame_sha256_test.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
blame_test.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
blame.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
blob_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
blob_nogogit.go Refactor the usage of batch catfile (#31754) 2024-08-20 17:04:57 +00:00
blob_test.go Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
blob.go Full-file syntax highlighting for diff pages (#33766) 2025-03-09 12:51:58 +08:00
command_race_test.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
command_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
command.go Refactor Git Attribute & performance optimization (#34154) 2025-04-11 21:41:29 +08:00
commit_convert_gogit.go Refactor commit signature parser (#30228) 2024-04-01 20:23:17 +00:00
commit_info_gogit.go add submodule diff links (#33097) 2025-01-08 01:38:30 +00:00
commit_info_nogogit.go Fix material icon & diff highlight (#33844) 2025-03-10 22:34:48 +08:00
commit_info_test.go Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
commit_info.go add submodule diff links (#33097) 2025-01-08 01:38:30 +00:00
commit_reader.go Enable more revive linter rules (#30608) 2024-04-22 11:48:42 +00:00
commit_sha256_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
commit_submodule_file_test.go Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
commit_submodule_file.go Link to tree views of submodules if possible (#33424) 2025-01-30 00:09:52 +00:00
commit_submodule.go add submodule diff links (#33097) 2025-01-08 01:38:30 +00:00
commit_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
commit.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
config_submodule_test.go Fix submodule parsing (#32571) 2024-11-20 19:26:12 +00:00
config_submodule.go Fix submodule parsing (#32571) 2024-11-20 19:26:12 +00:00
config_test.go Fix submodule parsing (#32571) 2024-11-20 19:26:12 +00:00
config.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
diff_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
diff.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
error.go Keep file tree view icons consistent with icon theme (#33921) 2025-04-06 19:35:08 +00:00
fsck.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
git_test.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
git.go Refactor Git Attribute & performance optimization (#34154) 2025-04-11 21:41:29 +08:00
grep_test.go Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
grep.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
hook.go Move duplicated functions (#33977) 2025-03-25 14:40:31 +00:00
last_commit_cache_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
last_commit_cache_nogogit.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
last_commit_cache.go Refactor cache and disable go-chi cache (#30417) 2024-04-13 08:38:44 +00:00
log_name_status.go enable staticcheck QFxxxx rules (#34064) 2025-03-29 17:32:28 -04:00
notes_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
notes_nogogit.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
notes_test.go Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
notes.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
object_format.go Make sure git version&feature are always prepared (#30877) 2024-05-06 18:34:16 +02:00
object_id_gogit.go Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
object_id_test.go Fix incorrect object id hash function (#30708) 2024-04-26 09:49:48 +00:00
object_id.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
parse_gogit_test.go Resolve lint for unused parameter and unnecessary type arguments (#30750) 2024-04-29 08:47:56 +00:00
parse_gogit.go Resolve lint for unused parameter and unnecessary type arguments (#30750) 2024-04-29 08:47:56 +00:00
parse_nogogit_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
parse_nogogit.go Add file tree to file view page (#32721) 2025-03-15 16:26:49 +08:00
parse.go Add go wrapper around git diff-tree --raw -r -M (#33369) 2025-02-07 00:58:28 +00:00
README.md move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364) 2019-03-27 17:33:00 +08:00
ref_test.go Refactor RefName (#33234) 2025-01-13 14:01:53 +08:00
ref.go Refactor RefName (#33234) 2025-01-13 14:01:53 +08:00
remote.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_archive_test.go Refactor context RefName and RepoAssignment (#33226) 2025-01-13 01:07:05 +00:00
repo_archive.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_base_gogit.go Move duplicated functions (#33977) 2025-03-25 14:40:31 +00:00
repo_base_nogogit.go Decouple Batch from git.Repository to simplify usage without requiring the creation of a Repository struct. (#34001) 2025-03-27 17:35:48 +00:00
repo_blame.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_blob_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
repo_blob_nogogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
repo_blob_test.go Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
repo_blob.go Improve ObjectFormat interface (#28496) 2023-12-19 07:20:47 +00:00
repo_branch_gogit.go Fix typo in documentation of GetBranchNames() (#33330) 2025-01-19 18:41:15 -05:00
repo_branch_nogogit.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_branch_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
repo_branch.go Refactor Branch struct in package modules/git (#33980) 2025-04-02 17:31:32 +00:00
repo_commit_gogit.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_commit_nogogit.go Avoid creating unnecessary temporary cat file sub process (#33942) 2025-04-04 16:19:19 -07:00
repo_commit_test.go Fix commit range paging (#32944) 2024-12-23 07:07:12 +00:00
repo_commit.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_commitgraph_gogit.go Use filepath.Join instead of path.Join for file system file operations (#33978) 2025-03-24 14:50:28 -07:00
repo_commitgraph.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_compare_test.go Refactor getpatch/getdiff functions and remove unnecessary fallback (#32817) 2024-12-24 14:29:34 +08:00
repo_compare.go Decouple diff stats query from actual diffing (#33810) 2025-03-08 17:36:08 +08:00
repo_gpg.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_hook.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
repo_index.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
repo_object.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_ref_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
repo_ref_nogogit.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_ref_test.go Fix commit retrieval by tag (#21804) 2023-03-02 13:32:21 +08:00
repo_ref.go enable staticcheck QFxxxx rules (#34064) 2025-03-29 17:32:28 -04:00
repo_stats_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
repo_stats.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_tag_gogit.go Fix submodule parsing (#32571) 2024-11-20 19:26:12 +00:00
repo_tag_nogogit.go Avoid creating unnecessary temporary cat file sub process (#33942) 2025-04-04 16:19:19 -07:00
repo_tag_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
repo_tag.go Move git references checking to gitrepo packages to reduce expose of repository path (#33891) 2025-03-15 19:48:59 -07:00
repo_test.go Use test context in tests and new loop system in benchmarks (#33648) 2025-02-20 09:57:40 +00:00
repo_tree_gogit.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo_tree_nogogit.go Avoid creating unnecessary temporary cat file sub process (#33942) 2025-04-04 16:19:19 -07:00
repo_tree.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
repo.go Uniform all temporary directories and allow customizing temp path (#32352) 2025-04-08 16:15:28 +00:00
signature_gogit.go Refactor parseSignatureFromCommitLine (#29054) 2024-02-09 11:02:53 +08:00
signature_nogogit.go Refactor parseSignatureFromCommitLine (#29054) 2024-02-09 11:02:53 +08:00
signature_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
signature.go Refactor parseSignatureFromCommitLine (#29054) 2024-02-09 11:02:53 +08:00
submodule_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
submodule.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
tag_test.go Refactor commit signature parser (#30228) 2024-04-01 20:23:17 +00:00
tag.go Avoid creating unnecessary temporary cat file sub process (#33942) 2025-04-04 16:19:19 -07:00
tree_blob_gogit.go Add file tree to file view page (#32721) 2025-03-15 16:26:49 +08:00
tree_blob_nogogit.go Inherit submodules from template repository content (#16237) 2025-01-01 02:55:13 +00:00
tree_blob.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
tree_entry_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
tree_entry_mode.go Keep file tree view icons consistent with icon theme (#33921) 2025-04-06 19:35:08 +00:00
tree_entry_nogogit.go Inherit submodules from template repository content (#16237) 2025-01-01 02:55:13 +00:00
tree_entry_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
tree_entry.go Keep file tree view icons consistent with icon theme (#33921) 2025-04-06 19:35:08 +00:00
tree_gogit.go Abstract hash function usage (#28138) 2023-12-13 21:02:00 +00:00
tree_nogogit.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
tree_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
tree.go Remove context from git struct (#33793) 2025-03-04 11:56:11 -08:00
utils_test.go Refactor sha1 and time-limited code (#31023) 2024-05-20 15:12:50 +00:00
utils.go Move duplicated functions (#33977) 2025-03-25 14:40:31 +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.