git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: David Lang <david@lang.hm>
To: "Jakub Narębski" <jnareb@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	Nikolaus Rath <Nikolaus@rath.org>, git <git@vger.kernel.org>
Subject: Re: Working with zip files
Date: Thu, 18 Aug 2016 20:00:22 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.02.1608181954560.11774@nftneq.ynat.uz> (raw)
In-Reply-To: <CANQwDwebocSzwrLRNoZMCkXy0D2HrSrXSyLxV=jNJ4xzCWDhHw@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1857 bytes --]

On Thu, 18 Aug 2016, Jakub Narębski wrote:

> On 18 August 2016 at 18:56, David Lang <david@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
> https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes
>
> 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.

As I read that section, it only applies to the human readable output of git 
diff.

And the merge section only talks about the default of using patch vs accepting a 
specific version in a merge.

It seems to me that what I'm looking for would be something to tell git to use a 
different command instead of diff/patch internally when creating and using the 
bundles.

David Lang

  reply	other threads:[~2016-08-19  3:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16 16:25 Working with zip files Nikolaus Rath
2016-08-16 16:27 ` David Lang
2016-08-16 16:32   ` Nikolaus Rath
2016-08-16 16:48     ` David Lang
2016-08-16 16:58   ` Junio C Hamano
2016-08-16 19:56     ` Jakub Narębski
2016-08-16 20:19       ` Junio C Hamano
2016-08-18 12:16         ` Jakub Narębski
2016-08-18 16:56           ` David Lang
2016-08-18 17:45             ` Jakub Narębski
2016-08-19  3:00               ` David Lang [this message]
2016-08-16 21:14   ` Nikolaus Rath
2016-08-17  5:31     ` Jacob Keller
2016-08-17  9:58     ` David Lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1608181954560.11774@nftneq.ynat.uz \
    --to=david@lang.hm \
    --cc=Nikolaus@rath.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).