# RE: Huge pack file from small unpacked objects

6 messages from 2009-12-16 to 2009-12-22. Participants: Nick Triantos, B Smith-Mannschott, Nicolas Pitre, Junio C Hamano.
Thread: https://gitlist.dev/t/21969

## Nick Triantos, 2009-12-16 16:34

Subject: RE: Huge pack file from small unpacked objects
Message-ID: <75B8C0BEE0AE2A44AA971D218D9FE99E3DD8C61C@VMBX125.ihostexchange.net>
URL: https://gitlist.dev/e/75B8C0BEE0AE2A44AA971D218D9FE99E3DD8C61C%40VMBX125.ihostexchange.net
In-Reply-To: <404585ED79625A40AB5A9884ECA9A63B3E02083F@VMBX125.ihostexchange.net>

```
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

```

## Nick Triantos, 2009-12-22 06:19

Subject: Huge pack file from small unpacked objects
Message-ID: <75B8C0BEE0AE2A44AA971D218D9FE99E6B06F030@VMBX125.ihostexchange.net>
URL: https://gitlist.dev/e/75B8C0BEE0AE2A44AA971D218D9FE99E6B06F030%40VMBX125.ihostexchange.net
In-Reply-To: <404585ED79625A40AB5A9884ECA9A63B3E02083F@VMBX125.ihostexchange.net>

```
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

```

## B Smith-Mannschott, 2009-12-22 08:54

Subject: Re: Huge pack file from small unpacked objects
Message-ID: <28c656e20912220054qc7b6497t79e135c913865c22@mail.gmail.com>
URL: https://gitlist.dev/e/28c656e20912220054qc7b6497t79e135c913865c22%40mail.gmail.com
In-Reply-To: <75B8C0BEE0AE2A44AA971D218D9FE99E3DD8C61C@VMBX125.ihostexchange.net>

```
On Wed, Dec 16, 2009 at 17:34, Nick Triantos <nick@perceptivepixel.com> wrote:
> 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

```

## Nicolas Pitre, 2009-12-22 17:41

Subject: Re: Huge pack file from small unpacked objects
Message-ID: <alpine.LFD.2.00.0912221238180.28241@xanadu.home>
URL: https://gitlist.dev/e/alpine.LFD.2.00.0912221238180.28241%40xanadu.home
In-Reply-To: <75B8C0BEE0AE2A44AA971D218D9FE99E6B06F030@VMBX125.ihostexchange.net>

```
On Tue, 22 Dec 2009, Nick Triantos wrote:

> 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

```

## Nick Triantos, 2009-12-22 18:04

Subject: RE: Huge pack file from small unpacked objects
Message-ID: <75B8C0BEE0AE2A44AA971D218D9FE99E6B06F111@VMBX125.ihostexchange.net>
URL: https://gitlist.dev/e/75B8C0BEE0AE2A44AA971D218D9FE99E6B06F111%40VMBX125.ihostexchange.net
In-Reply-To: <28c656e20912220054qc7b6497t79e135c913865c22@mail.gmail.com>

```
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:
> 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, 2009-12-22 18:11

Subject: Re: Huge pack file from small unpacked objects
Message-ID: <7veimm3mm4.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7veimm3mm4.fsf%40alter.siamese.dyndns.org
In-Reply-To: <75B8C0BEE0AE2A44AA971D218D9FE99E6B06F111@VMBX125.ihostexchange.net>

```
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

```
