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

Re: Working with zip files

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 16, 2016, 16:58 UTC
Message-ID
<xmqqeg5oejmn.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<alpine.DEB.2.02.1608160926330.11774@nftneq.ynat.uz>
David Lang <david@lang.hm> writes:
Show 5 quoted lines
> you should be able to use clean/smudge to have git store the files
> uncompressed, which will help a lot.
>
> 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 stors 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.

Previous: David LangNext: Jakub Narębski
Message 5 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.