mirror of
https://github.com/go-gitea/gitea
synced 2026-02-03 11:10:40 +00:00
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>
This commit is contained in:
@@ -1796,6 +1796,7 @@
|
||||
"repo.pulls.remove_prefix": "Remove <strong>%s</strong> prefix",
|
||||
"repo.pulls.data_broken": "This pull request is broken due to missing fork information.",
|
||||
"repo.pulls.files_conflicted": "This pull request has changes conflicting with the target branch.",
|
||||
"repo.pulls.files_conflicted_no_listed_files": "(No conflicting files listed)",
|
||||
"repo.pulls.is_checking": "Checking for merge conflicts…",
|
||||
"repo.pulls.is_ancestor": "This branch is already included in the target branch. There is nothing to merge.",
|
||||
"repo.pulls.is_empty": "The changes on this branch are already on the target branch. This will be an empty commit.",
|
||||
|
||||
Reference in New Issue
Block a user