gitea/models
Lunny Xiao 1463426a27
Use merge tree to detect conflicts when possible (#36400)
In Git 2.38, the `merge-tree` command introduced the `--write-tree`
option, which works directly on bare repositories. In Git 2.40, a new parameter `--merge-base` introduced so we require Git 2.40 to use the merge tree feature.

This option produces the merged tree object ID, allowing us to perform
diffs between commits without creating a temporary repository. By
avoiding the overhead of setting up and tearing down temporary repos,
this approach delivers a notable performance improvement.

It also fixes a possible situation that conflict files might be empty
but it's a conflict status according to
https://git-scm.com/docs/git-merge-tree#_mistakes_to_avoid

Replace #35542

---------

Signed-off-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-01-27 11:57:20 -08:00
..
actions Add a doctor command to fix inconsistent run status (#35840) 2025-11-04 03:32:26 +01:00
activities Fix incorrect pull request counter (#35819) 2025-11-03 20:52:13 +00:00
admin Don't block site admin's operation if SECRET_KEY is lost (#35721) 2025-10-22 12:35:56 +08:00
asymkey Add an option to automatically verify SSH keys from LDAP (#35927) 2025-12-27 12:33:08 +00:00
auth Don't block site admin's operation if SECRET_KEY is lost (#35721) 2025-10-22 12:35:56 +08:00
avatars Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
db Fix various typos in codebase (#35480) 2025-09-13 10:34:43 -04:00
dbfs Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
fixtures Add a doctor command to fix inconsistent run status (#35840) 2025-11-04 03:32:26 +01:00
git Fix typos: unknow -> unknown, pktLineTypeUnknow -> pktLineTypeUnknown (#36419) 2026-01-22 01:17:06 +00:00
issues Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
migrations Fix missing repository id when migrating release attachments (#36389) 2026-01-20 10:05:51 -08:00
organization Fix team member access check (#35899) 2025-11-09 03:13:31 +00:00
packages Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
perm Bump golangci-lint to 2.7.2, enable modernize stringsbuilder (#36180) 2025-12-17 20:50:53 +00:00
project Fix permission check on org project operations (#36318) 2026-01-14 17:29:33 +00:00
pull Fix incorrect viewed files counter if file has changed (#36009) 2025-11-27 14:02:03 +00:00
renderhelper fix: generate IDs for HTML headings without id attribute (#36233) 2026-01-06 05:09:44 +00:00
repo Fix missing repository id when migrating release attachments (#36389) 2026-01-20 10:05:51 -08:00
secret Don't block site admin's operation if SECRET_KEY is lost (#35721) 2025-10-22 12:35:56 +08:00
shared/types Refactor locale&string&template related code (#29165) 2024-02-14 21:48:45 +00:00
system Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
unit Run `gopls modernize` on codebase (#34751) 2025-06-18 01:48:09 +00:00
unittest Refactor db package (#35380) 2025-08-30 01:04:06 +08:00
user Fix openid setting check (#36346) 2026-01-13 12:44:29 +00:00
webhook Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
main_test.go
repo.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
repo_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00