git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergio Callegari <scallegari@arces.unibo.it>
To: git@vger.kernel.org
Subject: Re: Interaction between clean/smudge and git status
Date: Mon, 14 Apr 2008 07:38:58 +0000 (UTC)	[thread overview]
Message-ID: <loom.20080414T072615-85@post.gmane.org> (raw)
In-Reply-To: 7vej98apdo.fsf@gitster.siamese.dyndns.org

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

  parent reply	other threads:[~2008-04-14  7:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-13 23:25 Interaction between clean/smudge and git status Sergio Callegari
2008-04-14  6:48 ` Johannes Sixt
2008-04-14  7:04   ` Junio C Hamano
2008-04-14  7:21     ` Johannes Sixt
2008-04-14  7:38     ` Sergio Callegari [this message]
2008-04-14  8:18       ` Sergio Callegari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20080414T072615-85@post.gmane.org \
    --to=scallegari@arces.unibo.it \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).