Re: Interaction between clean/smudge and git status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster <at> pobox.com> writes:


> 
> What is to "re-zip"?  You have a .zip file that contains a single file in
> your work tree, and the index and the tree objects record that single file
> deflated?  When you "check out" from the index, you run smudge to create a
> new .zip file with that single file?

I have a zip file that contains a collection of files (or I have an openoffice
file that is just the same).  The program that creates the zip file uses default
compression.  In this way, things managed by git result in objects that cannot
be deltified one against the other very well by git repack.

my re-zip script takes a zip file on stdin, unpacks everything in a temporary
directory, then recreates the archive with a different compression level and
puts it out on stdout.  When the compression is 0, things are merely put in the
archive. In this way the files managed git result in objects that do deltify
well one against the other and in much smaller packs.

> Are you recreating the .zip file in the filter in such a way that a file
> with the same contents results in byte-to-byte identical .zip file?
> Otherwise as far as git is concerned you have changed the file in the work
> tree.

And here you are right!!!
I thought that re-zip script was repeatable in behaviour, but it is not
(probably because things like file dates change when files are unpacked in the
temporary dir and dates get stored).

I absolutely overlooked that.

Then to do what I want to do, I need to work at a lower level, I cannot just
unzip and zip again.

Thanks



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux