git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Jakub Narębski" <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: David Lang <david@lang.hm>, Nikolaus Rath <Nikolaus@rath.org>,
	git@vger.kernel.org
Subject: Re: Working with zip files
Date: Thu, 18 Aug 2016 14:16:27 +0200	[thread overview]
Message-ID: <12866c04-f910-2a83-b445-6eada3d2efc9@gmail.com> (raw)
In-Reply-To: <xmqq8tvwcvrc.fsf@gitster.mtv.corp.google.com>

W dniu 16.08.2016 o 22:19, Junio C Hamano pisze:
> Jakub Narębski <jnareb@gmail.com> writes:
> 
>> 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).
> 
> That assumes that the in-repository data is zipped binary blob; the
> result won't delta well, will it?

Full solution would involve `clean` filter to rezip with no compression
(which should delta well) and optional `smudge` filter to recompress;
if round-trip bit-for-bit equality is needed, the original zip parameters
must be saved somewhere, e.g. as ZIP archive comments.  This was mentioned
in the earlier part of my email (which might have been not clear):

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...

-- 
Jakub Narębski

  reply	other threads:[~2016-08-18 12:18 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 [this message]
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

  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=12866c04-f910-2a83-b445-6eada3d2efc9@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.
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).