Using hachoir-metadata for git attributes

on 2014-07-31

Hachoir-metadata is a great tool for multimedia diff.

I'm using it for tar, jpg and png files. You can have the full list here.

It's available in Debian and with Homebrew.

~/.config/git/attributes

*.tar.* diff=hachoir
*.png diff=hachoir
*.jpeg diff=hachoir
*.jpg diff=hachoir
*.JPG diff=hachoir

~/.gitconfig

[diff "hachoir"]
        textconv = hachoir-metadata
        cachetextconv = true

Edit: textract for pdf and docx.