ungit icon indicating copy to clipboard operation
ungit copied to clipboard

Image diffs not working on Git LFS

Open FredrikNoren opened this issue 7 years ago • 8 comments

When I change an image, it's no longer shown as a diff in the UI. Only the new version of the image is show.

@codingtwinky any ideas?

FredrikNoren avatar May 06 '17 13:05 FredrikNoren

Ah... Can you clarify what situation? My tests on bot diff on staging and git commit bubble was successful.

screen shot 2017-05-07 at 21 16 19

jung-kim avatar May 08 '17 04:05 jung-kim

Hm odd, neither of those work for me:

In this case it's a changed image (should be two images here with an arrow): screen shot 2017-05-08 at 12 51 50 pm

And here too, but here even the changed image doesn't show: screen shot 2017-05-08 at 12 51 16 pm

Maybe there's some issue with getting the image from git (which would explain why it doesn't work in the second image). I'm on git 2.11.0 (Apple Git-81) and I think you're on windows right?

FredrikNoren avatar May 08 '17 10:05 FredrikNoren

Nope, on mac as well. Maybe one of unmerged changes inadvertently fixed it? I will try out the master branch later but I'm flying out yet again so it maybe late

jung-kim avatar May 08 '17 16:05 jung-kim

@FredrikNoren Does this problem still exists?

jung-kim avatar Jul 24 '17 02:07 jung-kim

@codingtwinky oh I think I get what's going on here. The repo is using git large file storage, so when ungit runs git show HEAD:thefile.png, the output is just:

version https://git-lfs.github.com/spec/v1
oid sha256:bfbb3d533ddd53a3b0713079ed87e1efaed80f3066c6fe072b6557890d0022cc
size 64397

instead of the actual image.

FredrikNoren avatar Jul 25 '17 21:07 FredrikNoren

Hi guys - I guess this means ungit doesn't support LFS? If not, any plans to support it?

ajostergaard avatar Dec 31 '17 09:12 ajostergaard

@ajostergaard At worst case of scenario, this seemingly means LFS tracked images are not properly displayed in Ungit UI.

@FredrikNoren I've just tested LFS tracked images with ungit and it seems to be functional. Is this still a problem?

jung-kim avatar Jan 14 '18 22:01 jung-kim

@jung-kim I just tested it, and it seems to still be a problem, though it's not universal; files committed before git lfs was added display without any issues, even when you alter them again later. However, all images added after git lfs was installed and added to the project show as broken images. A silent error is thrown when attempting to examine them, shown below:

stderr: (node:13964) UnhandledPromiseRejectionWarning: #<Object> (node:13964) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)

Tried restarting the process, refreshing the page, and making an edit to a file that wasn't displaying properly to see if it was an issue just with initialized but unmodified files. All cases failed. The only passing cases are when a file is added before git lfs is applied to it.

freedomfamilygames avatar Feb 24 '21 17:02 freedomfamilygames