mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-24 01:40:31 +00:00
fix(pulls): respect diff.orderFile in diff file tree (#38566)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -60,6 +60,11 @@ func runGitDiffTree(ctx context.Context, gitRepo *git.Repository, useMergeBase b
|
||||
cmd := gitcmd.NewCommand("diff-tree", "--raw", "-r", "--root").
|
||||
AddOptionFormat("--find-renames=%s", setting.Git.DiffRenameSimilarityThreshold)
|
||||
|
||||
// HINT: GIT-DIFF-TREE-UI-CONFIG: apply the diff.orderfile explicitly
|
||||
if git.GlobalConfig.DiffOrderFile != "" {
|
||||
cmd.AddOptionFormat("-O%s", git.GlobalConfig.DiffOrderFile)
|
||||
}
|
||||
|
||||
if useMergeBase {
|
||||
cmd.AddArguments("--merge-base")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user