mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Fix yet another bug with diff file names (#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 <art27@cantab.net>
This commit is contained in:
parent
1fbc50f974
commit
96969ddec8
3 changed files with 247 additions and 51 deletions
|
@ -694,7 +694,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]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue