0

When I call magit-status git lfs files are shown as follows.

modified   src/myfile
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
-size 4241
+oid sha256:9999999999999999999999999999999999999999999999999999999999999999
+size 4242

Is it possible to tell magit to show me the diff of the contents instead of the lfs-pointers' diff?

2
  • There's a magit-lfs package on Melpa. Why don't you give it a try and see what it does? – db48x Jul 27 '20 at 20:55
  • I have it installed already :) but no luck – Cesc Jul 28 '20 at 4:30
2

Here I found my answer. The command git config diff.lfs.textconv cat does the trick for me. Even though as mentioned by tarsius, this comes with a significant slowdown, that's what I needed

1

Magit itself does not support this and I think it probably should not.

In any case, you can probably tell git diff itself to display these differently and since Magit just uses git diff that would affect it too.

It seems reasonable for git to not display diffs for lfs files; after all lfs is intended for huge files whose diffs are not useful and/or huge. If you manage to display the diffs, that could come with a significant slowdown.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.