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

Re: Working with zip files

From
Jacob Keller <jacob.keller@gmail.com>
Date
Aug 17, 2016, 05:31 UTC
Message-ID
<CA+P7+xp2q8JWqqtqj-ATd=Ox9snTpC0DE9ND76VhV-5hOvVQdw@mail.gmail.com>
In-Reply-To
<87pop8wh5w.fsf@thinkpad.rath.org>
On Tue, Aug 16, 2016 at 2:14 PM, Nikolaus Rath <Nikolaus@rath.org> wrote:
Show 25 quoted lines
> On Aug 16 2016, David Lang <david@lang.hm> wrote:
>> On Tue, 16 Aug 2016, Nikolaus Rath wrote:
>>
>>> I would like to store Simulink models in a Git
>>> repository. Unfortunately, the file format is binary. But luckily, the
>>> binary format happens to be a zipfile containing nicely formatted XML
>>> files.
>>>
>>> Is there a way to teach Git to take advantage of this when storing,
>>> diff-ing and merging these files?
>>
>> you should be able to use clean/smudge to have git store the files
>> uncompressed, which will help a lot.
>
> Having looked at that, I'm not sure if this really helps:
>
> As I understand, the smudge command is run on checkout to convert the
> blob in the repository to the format that is desired in the working
> tree. But this is the opposite of what I need: on checkout, I need to
> convert the text data in the repository to a blob in the working tree.
>
> Furthermore, I need to convert multiple text files into one blob, will
> smudge/clean seem to do just 1:1 conversions.
>
> Am I missing something? Are there any other options?

You want to store the contents of the zip file as *one* blob that is the uncompressed contents of the archive somehow concatenated together. That should still be a 1:1 relationship.

You won't store one blob per file in the zip.

Thanks, Jake

Previous: Nikolaus RathNext: David Lang
Message 13 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.