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