# git-repack && git-prune-packed isn't doing it's job anymore?

3 messages from 2006-03-04 to 2006-03-04. Participants: Martin Langhoff, Junio C Hamano.
Thread: https://gitlist.dev/t/3542

## Martin Langhoff, 2006-03-04 00:29

Subject: git-repack && git-prune-packed isn't doing it's job anymore?
Message-ID: <46a038f90603031629qbbb287ckd8da1ef56a831dba@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90603031629qbbb287ckd8da1ef56a831dba%40mail.gmail.com

```
$ find .git/objects -type f | grep -v pack | wc -l
    3297
$ git-repack && git-prune-packed
Generating pack...
Done counting 664 objects.
Deltifying 664 objects.
 100% (664/664) done
Writing 664 objects.
 100% (664/664) done
Total 664, written 664 (delta 384), reused 0 (delta 0)
Pack pack-f38c51a5d5194d6a2f6e711586b9a51980c8d524 created.
$ find .git/objects -type f | grep -v pack | wc -l
    2583

Strange! This is from todays master,

$ git --version
git version 1.2.4.g0a60

cheers,


martin

```

## Junio C Hamano, 2006-03-04 00:53

Subject: Re: git-repack && git-prune-packed isn't doing it's job anymore?
Message-ID: <7v64mv2for.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v64mv2for.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <46a038f90603031629qbbb287ckd8da1ef56a831dba@mail.gmail.com>

```
"Martin Langhoff" <martin.langhoff@gmail.com> writes:

> $ find .git/objects -type f | grep -v pack | wc -l
>     3297
> $ git-repack && git-prune-packed
> Generating pack...
> Done counting 664 objects.
> Deltifying 664 objects.
>  100% (664/664) done
> Writing 664 objects.
>  100% (664/664) done
> Total 664, written 664 (delta 384), reused 0 (delta 0)
> Pack pack-f38c51a5d5194d6a2f6e711586b9a51980c8d524 created.
> $ find .git/objects -type f | grep -v pack | wc -l
>     2583

The last one would be "git count-objects", but repack packs
things that are reachable from your refs and prune-packed
removes what are in packs, so perhaps these are unreachable
objects?  I'd imagine fsck-objects would say they are dangling.

If that is the case, "git prune" would be the right tool to use.

And this is not something that changed recently.

```

## Martin Langhoff, 2006-03-04 01:01

Subject: Re: git-repack && git-prune-packed isn't doing it's job anymore?
Message-ID: <46a038f90603031701o3f5c948cl1eb05c0f731251b3@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90603031701o3f5c948cl1eb05c0f731251b3%40mail.gmail.com
In-Reply-To: <7v64mv2for.fsf@assigned-by-dhcp.cox.net>

```
On 3/4/06, Junio C Hamano <junkio@cox.net> wrote:
> If that is the case, "git prune" would be the right tool to use.

Spot on. Thanks!

> And this is not something that changed recently.

Of course, my bad. I had not seen this before. I guess it was because
I hadn't actually paid much attention at leftover objects in
oft-rebased repositories. I used to look at the .git/objects directory
a lot in my early git days, when I didn't do any rebasing.

thanks again!


martin

```
