go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.6k stars 5.45k forks source link

Can't preview commit with PANIC on gitdiff.go:357 #9173

Closed shemgp closed 4 years ago

shemgp commented 4 years ago

Screenshots

Screenshot from 2019-11-27 10-13-28 Screenshot from 2019-11-27 10-13-24

Thanks for looking into this.

guillep2k commented 4 years ago

It looks like somehow diffFile.Sections is empty @ 357:

https://github.com/go-gitea/gitea/blob/b50dee5a61b3959bb3606973d359741f0ca9af9a/services/gitdiff/gitdiff.go#L344-L360

@blueworrybear