threads / discuss / 21969

RE: Huge pack file from small unpacked objects

Subject: RE: Huge pack file from small unpacked objects

## tl;dr

6 messages between Dec 16, 2009 and Dec 22, 2009.

replies: 5people: 4as markdown or json

Nick Triantos· Dec 16, 2009, 16:34 UTC · lore
Hi,
I recently created a repo from SVN via git-svn.  The bare repo was about ~600MB.  I cloned it, and on the clone, I added 2 small files (.gitignore and .gitattributes) to a branch, merged them to master, and pushed that back to the origin.  The cloned repo remains at about 600MB, while my origin repo (the one from svn) is now about 2.4GB.  I found that it created a file in objects/pack which accounts for this huge size.
I've tried running 'git repack -a -d' but that didn't shrink the size of this pack file.
Any ideas why the pack file is so huge?  Anything I can do to shrink it?  My coworkers are understandably unhappy that the repo is so huge now (makes for very slow pulls)

thanks, -Nick

B Smith-Mannschott· Dec 22, 2009, 08:54 UTC · re: Nick Triantos · lore

Re: Huge pack file from small unpacked objects

On Wed, Dec 16, 2009 at 17:34, Nick Triantos <nick@perceptivepixel.com> wrote:
Show 7 quoted lines
> Hi,
>
> I recently created a repo from SVN via git-svn.  The bare repo was about ~600MB.  I cloned it, and on the clone, I added 2 small files (.gitignore and .gitattributes) to a branch, merged them to master, and pushed that back to the origin.  The cloned repo remains at about 600MB, while my origin repo (the one from svn) is now about 2.4GB.  I found that it created a file in objects/pack which accounts for this huge size.
>
> I've tried running 'git repack -a -d' but that didn't shrink the size of this pack file.
>
> Any ideas why the pack file is so huge?  Anything I can do to shrink it?  My coworkers are understandably unhappy that the repo is so huge now (makes for very slow pulls)
Have you tried "git prune"?
// Ben
Nick Triantos· Dec 22, 2009, 18:04 UTC · re: B Smith-Mannschott · lore
I've tried running 'git gc' (which should be pruning) and that hasn't helped.
Is there an easy way to unpack the pack file and see what's inside (including sizes)?

thanks, -Nick

-----Original Message-----
From: B Smith-Mannschott [mailto:bsmith.occs@gmail.com] 
Sent: Tuesday, December 22, 2009 12:55 AM
To: Nick Triantos
Cc: git@vger.kernel.org
Subject: Re: Huge pack file from small unpacked objects
On Wed, Dec 16, 2009 at 17:34, Nick Triantos <nick@perceptivepixel.com> wrote:
Show 7 quoted lines
> Hi,
>
> I recently created a repo from SVN via git-svn.  The bare repo was about ~600MB.  I cloned it, and on the clone, I added 2 small files (.gitignore and .gitattributes) to a branch, merged them to master, and pushed that back to the origin.  The cloned repo remains at about 600MB, while my origin repo (the one from svn) is now about 2.4GB.  I found that it created a file in objects/pack which accounts for this huge size.
>
> I've tried running 'git repack -a -d' but that didn't shrink the size of this pack file.
>
> Any ideas why the pack file is so huge?  Anything I can do to shrink it?  My coworkers are understandably unhappy that the repo is so huge now (makes for very slow pulls)
Have you tried "git prune"?
// Ben
Junio C Hamano· Dec 22, 2009, 18:11 UTC · re: Nick Triantos · lore

Re: Huge pack file from small unpacked objects

Nick Triantos <nick@perceptivepixel.com> writes:
> Is there an easy way to unpack the pack file and see what's inside (including sizes)?
Unpack?
    (mkdir /var/tmp/junk &&
     cd /var/tmp/junk &&
     git init && git unpack-objects) <.git/objects/pack/pack-$that_one.pack
It might also be interesting to see
    git verify-pack -v .git/objects/pack/pack-$that_one.pack
Nick Triantos· Dec 22, 2009, 06:19 UTC · lore

Huge pack file from small unpacked objects

Hi,
(re-sending.. I'm not sure if my last send made it to the list, I got a bounce because it had HTML.)
I recently created a repo from SVN via git-svn.  The bare repo was about ~600MB.  I cloned it, and on the clone, I added 2 small files (.gitignore and .gitattributes) to a branch, merged them to master, and pushed that back to the origin.  The cloned repo remains at about 600MB, while my origin repo (the one from svn) is now about 2.4GB.  I found that it created a file in objects/pack which accounts for this huge size.
I've tried running 'git repack -a -d' but that didn't shrink the size of this pack file.
Any ideas why the pack file is so huge?  Anything I can do to shrink it?  My coworkers are understandably unhappy that the repo is so huge now (makes for very slow pulls)

thanks, -Nick

Nicolas Pitre· Dec 22, 2009, 17:41 UTC · re: Nick Triantos · lore

Re: Huge pack file from small unpacked objects

On Tue, 22 Dec 2009, Nick Triantos wrote:
Show 10 quoted lines
> I recently created a repo from SVN via git-svn.  The bare repo was 
> about ~600MB.  I cloned it, and on the clone, I added 2 small files 
> (.gitignore and .gitattributes) to a branch, merged them to master, 
> and pushed that back to the origin.  The cloned repo remains at about 
> 600MB, while my origin repo (the one from svn) is now about 2.4GB.  I 
> found that it created a file in objects/pack which accounts for this 
> huge size.
> 
> I've tried running 'git repack -a -d' but that didn't shrink the size 
> of this pack file.
This is rather weird.

Any chance the original repository could be downloaded somewhere in order to attempt reproducing this issue?

Nicolas

← back to recent threads