Error 500 when trying to open a new PR with an empty CSV file #7932

Closed
opened 2025-11-02 07:42:06 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @noiaverbale on GitHub (Oct 5, 2021).

Gitea Version

1.15.3

Git Version

2.30.2

Operating System

Docker

How are you running Gitea?

Docker, image gitea/gitea:1.15.3

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

https://gist.github.com/noiaverbale/4c3b1706e54f581c32eb3790fa7f7373

Description

When I click "New Pull Request" button from a branch where an empty csv file has been added to, an error 500 appears.

To reproduce it you just need to:

  1. checkout a new branch
  2. add, commit and push empty file with csv extension
  3. open new PR or compare with parent branch

URLs

Screenshots

SharedScreenshot

Originally created by @noiaverbale on GitHub (Oct 5, 2021). ### Gitea Version 1.15.3 ### Git Version 2.30.2 ### Operating System Docker ### How are you running Gitea? Docker, image `gitea/gitea:1.15.3` ### Database PostgreSQL ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist https://gist.github.com/noiaverbale/4c3b1706e54f581c32eb3790fa7f7373 ### Description When I click "New Pull Request" button from a branch where an empty csv file has been added to, an error 500 appears. To reproduce it you just need to: 1. checkout a new branch 2. add, commit and push empty file with csv extension 3. open new PR or compare with parent branch **URLs** - Branch with empty csv file: https://try.gitea.io/noiaverbale/empty-csv-issue-test/src/branch/empty-csv - After clicking "New Pull Request" button: https://try.gitea.io/noiaverbale/empty-csv-issue-test/compare/master...empty-csv ### Screenshots ![SharedScreenshot](https://user-images.githubusercontent.com/37828584/135977737-4162e20e-465f-49a5-b79e-29c63d190688.jpg)
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 07:42:06 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Oct 5, 2021):

may be fixed in #17018

@KN4CK3R commented on GitHub (Oct 5, 2021): may be fixed in #17018
Author
Owner

@kdumontnu commented on GitHub (Nov 2, 2021):

Looks like this is fixed 🎉

@kdumontnu commented on GitHub (Nov 2, 2021): Looks like this is fixed 🎉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7932