From 062ea40a79e9b02b1381ec3cd86fc1842aa5f896 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 9 Sep 2020 19:03:54 +0100 Subject: Fix yet another bug with diff file names (#12771) (#12776) Backport #12771 Following further testing it has become apparent that the diff line cannot be used to determine filenames for diffs with any sort of predictability the answer therefore is to use the other lines that are provided with a diff Fix #12768 Signed-off-by: Andrew Thornton --- modules/templates/helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/templates/helper.go b/modules/templates/helper.go index ddcb1baa99..f952b36593 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -619,7 +619,7 @@ func ActionContent2Commits(act Actioner) *repository.PushCommits { // DiffTypeToStr returns diff type name func DiffTypeToStr(diffType int) string { diffTypes := map[int]string{ - 1: "add", 2: "modify", 3: "del", 4: "rename", + 1: "add", 2: "modify", 3: "del", 4: "rename", 5: "copy", } return diffTypes[diffType] } -- cgit v1.2.3