From: Nicolas Pitre <nico@cam.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: Funny repack behaviour
Date: Sat, 08 Apr 2006 15:44:31 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0604081528070.2215@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.63.0604081233170.3283@wbgn013.biozentrum.uni-wuerzburg.de>
On Sat, 8 Apr 2006, Johannes Schindelin wrote:
> Hi,
>
> I just accidentally reran "git-repack -a -d" on a repository, where I just
> had run it. And I noticed a funny thing: Of about 4000 objects, it reused
> all but 8. So I reran it, and it reused all but 2. I ran it once again,
> and it reused all.
>
> The really funny thing is: it created the same pack every time!
Probably not. Subsequent packs were most probably even smaller !
> It is not critical, evidently, but I'd like to know what is causing this
> rather undeterministic behaviour. (Before you ask: no, I did not make a
> backup before running the tests, so I unfortunately cannot reproduce it).
To reproduce, or rather to reset the pack state, just use
"git-repack -a -f -d" then "git-repack -a -d" multiple times again.
For example, on the current git archive:
$ git-repack -a -f -d
[...]
Total 16548, written 16548 (delta 11007), reused 5390 (delta 0)
Pack pack-af9d39abfcb5fd6fd554f7fc8d1704f8dd2329e0 created.
pack size = 6032083 bytes.
$ git-repack -a -d
[...]
Total 16548, written 16548 (delta 11030), reused 16525 (delta 11007)
Pack pack-af9d39abfcb5fd6fd554f7fc8d1704f8dd2329e0 created.
pack size = 5976610 bytes
$ git-repack -a -d
[...]
Total 16548, written 16548 (delta 11030), reused 16548 (delta 11030)
Pack pack-af9d39abfcb5fd6fd554f7fc8d1704f8dd2329e0 created.
Pack size = 5976610 bytes
So in this case it took 2 itterations before converging on a smaller
pack by 55473 bytes.
I thought the reuse logic might sacrifice a bit on compression given the
speed boost, but I don't get why it is the opposite in practice and that
-f doesn't produce the smallest pack up front.
Nicolas
next prev parent reply other threads:[~2006-04-08 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-08 10:41 Funny repack behaviour Johannes Schindelin
2006-04-08 19:44 ` Nicolas Pitre [this message]
2006-04-08 22:11 ` Johannes Schindelin
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=Pine.LNX.4.64.0604081528070.2215@localhost.localdomain \
--to=nico@cam.org \
--cc=Johannes.Schindelin@gmx.de \
--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