From: Hin-Tak Leung <hintak.leung@gmail.com>
To: Andreas Ericsson <ae@op5.se>
Cc: git@vger.kernel.org
Subject: Re: object/pack size x5 larger than a fresh clone?
Date: Mon, 26 Jul 2010 19:42:13 +0100 [thread overview]
Message-ID: <AANLkTimLAROADKgWvEXa9QyyDGbWQGP+9BdbcN4fMHJ0@mail.gmail.com> (raw)
In-Reply-To: <4C4D42BA.6070900@op5.se>
On 7/26/10, Andreas Ericsson <ae@op5.se> wrote:
> On 07/24/2010 11:57 PM, Hin-Tak Leung wrote:
>> Is there any reason why a fresh git clone has a object pack around
>> 140MB but one that has been updated over the years has it over 700MB?
>> (even with git gc --aggressive --prune=now and git fsck?)
>>
>> $ du .git/objects/
>> 711364 .git/objects/pack
>>
>> $ du *wine/.git/objects/pack
>> 144692 git-wine/.git/objects/pack
>> 144604 wine/.git/objects/pack
>>
>> I had a problem with git fetch "Cannot obtain needed object" from
>> wine's git repository (which seems to be something to do with http
>> proxy, although AFAIK I don't have one) since about 2 weeks ago which
>> obviously does not apply to anybody else as I would have heard from
>> wine-devel.
>>
>> Editing .git/config to switch from a http url to git url cure it...
>> but in the course of investigating, I git clone fresh (there are only
>> about 3 local changes so I could just git-format-patch them and move
>> them)
>>
>> http://source.winehq.org/git/wine.git
>> git://source.winehq.org/git/wine.git
>>
>> and I am a bit surprised that the new clones are so much smaller than
>> the one I have been working on these last few years. (I have had the
>> old one for at least 3-4 years).
>
> To make a fair comparison, try
> git repack -a -f -d && git prune --expire=now
>
> in your old repository. Be warned that this will remove all commits
> reachable from reflogs but not from branch heads or tags though.
I have tried as you said, and it has gone slightly worse -
$ du .git/objects/
741172 .git/objects/pack
16 .git/objects/info
741196 .git/objects/
However, I think I found one very big anormaly - in most of my git
clones (I have ~20 projects I track) , .git/object/pack consists of
pairs of files like this:
pack-<sha1>.idx
pack-<sha1>. pack
with the occasional 3rd member, "pack-<sha1>. keep" . I did not look
before I did the above, but now the strange repository consists of one
such pair to about 147MB, which has a very new time stamp, but a lot
of singular pack-<sha1>.idx without a corresponding pack-<sha1>.pack ,
and some of them quite large, and many of them has time stamps going
back to Mar 2008. I have got almost 500 of them, and they vary from
about 1.2k to 12MB, so it adds up to over 550MB.
So I guess these *.idx without a corresponding *.pack are safe to
delete? But git gc or one of the other house keeping commands should
get rid of them though, I think.
Should I file a bug etc for this? Thanks a lot any how.
Hin-Tak
next prev parent reply other threads:[~2010-07-26 18:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-24 21:57 object/pack size x5 larger than a fresh clone? Hin-Tak Leung
2010-07-26 8:09 ` Andreas Ericsson
2010-07-26 18:42 ` Hin-Tak Leung [this message]
2010-07-27 16:57 ` Junio C Hamano
2010-07-27 17:03 ` Shawn O. Pearce
2010-07-27 21:15 ` Hin-Tak Leung
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=AANLkTimLAROADKgWvEXa9QyyDGbWQGP+9BdbcN4fMHJ0@mail.gmail.com \
--to=hintak.leung@gmail.com \
--cc=ae@op5.se \
--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).