git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Working with zip files

From
Jakub Narębski <jnareb@gmail.com>
Date
Aug 18, 2016, 12:16 UTC
Message-ID
<12866c04-f910-2a83-b445-6eada3d2efc9@gmail.com>
In-Reply-To
<xmqq8tvwcvrc.fsf@gitster.mtv.corp.google.com>
W dniu 16.08.2016 o 22:19, Junio C Hamano pisze:
Show 8 quoted lines
> 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
Previous: Junio C HamanoNext: David Lang
Message 8 of 14 in “Working with zip files”
  1. Nikolaus RathAug 16, 2016
  2. David LangAug 16, 2016
  3. Nikolaus RathAug 16, 2016
  4. David LangAug 16, 2016
  5. Junio C HamanoAug 16, 2016
  6. Jakub NarębskiAug 16, 2016
  7. Junio C HamanoAug 16, 2016
  8. Jakub NarębskiAug 18, 2016
  9. David LangAug 18, 2016
  10. Jakub NarębskiAug 18, 2016
  11. David LangAug 19, 2016
  12. Nikolaus RathAug 16, 2016
  13. Jacob KellerAug 17, 2016
  14. David LangAug 17, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.