### Description Deleting a .csv file from both the base and head branch in a compare will result in a 500 error. https://try.gitea.io/kdumontnu/test/compare/main...delete-csv ### Gitea Version d9c6cb71e ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Seen on 1.17 initially. Reproduced on try.gitea. ### Database None