On 18 August 2016 at 18:56, David Lang <da...@lang.hm> wrote:
> On Thu, 18 Aug 2016, Jakub Narębski wrote:
>> JN>> You can find rezip clean/smudge filter (originally intended for
>> JN>> OpenDocument Format (ODF), that is OpenOffice.org etc.) that stores
>> JN>> zip or zip-archive (like ODT, jar, etc.) uncompressed. I think
>> JN>> you can find it on GitWiki, but I might be mistaken.
>> Using 'unzip -c' as separate / additional `textconv` filter for diff
>> generation allows to separate the problem of deltifiable storage format
>> from textual representation for diff-ing.
>> Though best results could be had with `diff` and `merge` drivers...
> can you point at an example of how to do this? when I went looking about a
> year ago to deal with single-line json data I wasn't able to find anything
> good. I ended up using clean/smudge to pretty-print the json so it was
> easier to handle.
Pro Git has a chapter "Customizing Git - Git Attributes" about gitattributes
The section "Diffing Binary Files" has two examples: docx2txt (with wrapper)
for DOCX (MS Word) files, and exiftool for images. For JSON you could use
some prettyprinter / formatter like pp-json.
"Performing text diffs of binary files" section of gitattributes(1) manpage
covers 'textconv' vs 'diff', and uses 'exif' tool as textconv example.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html