Skip to content
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

ImageView: View failures as dump #8806

Merged
merged 1 commit into from Jan 30, 2021

Conversation

gerhardol
Copy link
Member

@gerhardol gerhardol commented Jan 29, 2021

Proposed changes

If an image cannot be viewed, an error message is shown but nothing of the file itself.
The user has has therefore no possibility to find the core problem.
If the file cannot be shown , this could be due to that the information the user has put in Git is corrupt, that the GE implementation cannot handle this type of image (like the GE hardcoded extension is used for another file) or that the image is stored with LFS. For LFS, GE (and most tools and web interfaces, but shown in GitHub) does not fetch the actual file but tries to display the LFS text as an image which obviously will fail. #6189 is WIP and has been that for some time....

Both GE not handling images and LFS will likely affect all "images" in a certain repo and most users will not understand why.

This PR will therefore display a hexdump with the information. For LFS files, you can read the test and hopefully understand that this is really a LFS file, not corrupt.

Screenshots

Before

image

After

image

image

Test methodology

View images in LFS enabled repo, also with corrupted images.
The repo with the screenshots: https://github.com/gerhardol/tmp_test/tree/test/unicode


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned gerhardol Jan 29, 2021
@codecov
Copy link

codecov bot commented Jan 29, 2021

Codecov Report

Merging #8806 (c359145) into master (ad44c43) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #8806      +/-   ##
==========================================
- Coverage   55.99%   55.96%   -0.04%     
==========================================
  Files         905      905              
  Lines       65301    65310       +9     
  Branches    11882    11882              
==========================================
- Hits        36568    36552      -16     
- Misses      25794    25817      +23     
- Partials     2939     2941       +2     
Flag Coverage Δ
production 43.11% <0.00%> (-0.04%) ⬇️
tests 94.46% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@RussKie RussKie merged commit 19a310e into gitextensions:master Jan 30, 2021
@ghost ghost added this to the 3.5 milestone Jan 30, 2021
@gerhardol gerhardol deleted the feature/view-fail-image branch January 30, 2021 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants