-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Images and other binary files not shown in diff #13060
Comments
Damn this one is gonna be something to do with the new diff header reading code. |
The problem will be in here gitea/services/gitdiff/gitdiff.go Line 446 in 144fa5a
And the issue will be that the bin diff isn't matched properly. This is really a lot of fun because it appears that the diff is: diff --git a/gitea-sm.png b/gitea-sm.png
new file mode 100644
index 0000000..0ae375c
Binary files /dev/null and b/gitea-sm.png differ Similarly for the empty file problem: diff --git a/.gitkeep b/.gitkeep
new file mode 100644
index 0000000..e69de29 We can't easily determine the file name from the diff line: Consider https://try.gitea.io/arandomer/pathological/commit/f4c9cf62d8e5c8720e2e11d608306065da05343d its diff is: diff --git a/b b/b b/b b/b b/b b/b
similarity index 100%
rename from b b/b
rename to b b/b b/b b/b
diff --git a/b b/b b/b b/b b/b b/b
similarity index 100%
rename from b
rename to b b/b b/b b/b b/b I just don't know how we're supposed to be able to parse these diffs in a non-breaking way... |
Ah --src-prefix and --dst-prefix can be used to force the damned paths to be escaped. Now just need to check if we can use those in early gits. |
Any news about this? |
This bug is still present in the newly migrated (GitHub -> Gitea 1.12.5) https://repo.palemoon.org/MoonchildProductions/Pale-Moon/commit/85f7050 Just thought you should know... 😄 |
Please don't @ mention me unless you explicitly need my input. |
Locking this as the issue is closed, and will be included in the next release. |
[x]
):Description
Images no longer display in the Web interface when viewing a commit's diff. Instead, they only display an empty line with the "BIN" label, and no filename. This is true for any binary file, as well as empty files.
Screenshots
The text was updated successfully, but these errors were encountered: