-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV diff: unable to load file from base commit #21184
Comments
That's a regression from #19552. This PR enforces base and head to be valid csv files which is not the case if a csv gets created. |
Or deleted? |
That may fail too. |
What #19530 (comment) states is wrong because |
|
Oh yes, I misunderstood the csvReaderFromCommit and CreateCsvDiff logic at that time. Then the question is whether #19552 really fixed the problem (#19530 (comment) said that the 500 error occurs on deleted files) Update (2023-02-17): #22946, CreateCsvDiff should be able to process the situation when base and head are both nil. |
I will add a new PR with better error handling which should work in these cases. |
Fixes go-gitea#21184 Regression of go-gitea#19552 Instead of using `GetBlobByPath` I use the already existing instances. We need more information from go-gitea#19530 if that error is still present.
Description
Creating a new CSV file as part of a pull request doesn't display the files content in the PRs
Files changed
tab:https://try.gitea.io/otbutz99/test/pulls/1/files
The file is valid and renders just fine if viewed directly:
https://try.gitea.io/otbutz99/test/src/commit/988460b06f64270788a9f30ed02947e4ab1e6f5a/SampleCSVFile_11kb.csv
The CSV diff works fine for me if the content of the CSV is just changed in the PR:
https://try.gitea.io/otbutz99/test/pulls/2/files
Gitea Version
1.17.2
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
Release binary via systemd
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: