From: "Jakub Narębski" <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>, David Lang <david@lang.hm>
Cc: Nikolaus Rath <Nikolaus@rath.org>, git@vger.kernel.org
Subject: Re: Working with zip files
Date: Tue, 16 Aug 2016 21:56:08 +0200 [thread overview]
Message-ID: <34d64f4f-3cda-385c-cdce-5f1852d545e3@gmail.com> (raw)
In-Reply-To: <xmqqeg5oejmn.fsf@gitster.mtv.corp.google.com>
W dniu 16.08.2016 o 18:58, Junio C Hamano pisze:
> David Lang <david@lang.hm> writes:
>
>> you should be able to use clean/smudge to have git store the files
>> uncompressed, which will help a lot.
You can find rezip clean/smudge filter (originally intended for
OpenDocument Format (ODF), that is OpenOffice.org etc.) that stores
zip or zip-archive (like ODT, jar, etc.) uncompressed. I think
you can find it on GitWiki, but I might be mistaken.
>> I think there's a way to tell it to do a xml aware diff/patch, but I
>> don't remember how.
>
> I do not know about "patch" (in the sense of "git apply"), but "git
> diff" (and "git log -p") can take advantage of the clean/smudge
> mechanism. I used to deal with a file format that is gzipped xml so
> my clean filter was "gzip -dc" while the smudge was "gzip -cn".
> Essentially, this stores the xml before compression in the repository
> so blobs delta well with each other and also the revisions are
> made textually diff-able.
>
> Nikolaus's case has one extra layer of complexity in that the "file"
> is actually an archive of multiple files. The clean/smudge pair he
> writes need to be a filter that flattens the archive into a single
> human-readable text byte stream and its reverse.
There is also `textconv` filter that can be used instead; it might
be 'unzip -c' (extract files to stdout, with filenames), or 'unzip -p'
(same, without filenames).
--
Jakub Narębski
next prev parent reply other threads:[~2016-08-16 19:56 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 [this message]
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
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34d64f4f-3cda-385c-cdce-5f1852d545e3@gmail.com \
--to=jnareb@gmail.com \
--cc=Nikolaus@rath.org \
--cc=david@lang.hm \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
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 NNTP newsgroup(s).