git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: object/pack size x5 larger than a fresh clone?

From
Andreas Ericsson <ae@op5.se>
Date
Jul 26, 2010, 08:09 UTC
Message-ID
<4C4D42BA.6070900@op5.se>
In-Reply-To
<AANLkTimL+wfu+yMPutq2VHD6vO2AtaF_7FpWt8aZPm1c@mail.gmail.com>
On 07/24/2010 11:57 PM, Hin-Tak Leung wrote:
Show 28 quoted lines
> 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.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
Previous: Hin-Tak LeungNext: Hin-Tak Leung
Message 2 of 6 in “object/pack size x5 larger than a fresh clone?”
  1. Hin-Tak LeungJul 24, 2010
  2. Andreas EricssonJul 26, 2010
  3. Hin-Tak LeungJul 26, 2010
  4. Junio C HamanoJul 27, 2010
  5. Shawn O. PearceJul 27, 2010
  6. Hin-Tak LeungJul 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.