threads / discuss / 3542

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

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

## tl;dr

3 messages between Mar 4, 2006 and Mar 4, 2006.

replies: 2people: 2as markdown or json

Martin Langhoff· Mar 4, 2006, 00:29 UTC · lore
$ 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· Mar 4, 2006, 00:53 UTC · re: Martin Langhoff · lore

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

"Martin Langhoff" <martin.langhoff@gmail.com> writes:
Show 13 quoted lines
> $ 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· Mar 4, 2006, 01:01 UTC · re: Junio C Hamano · lore

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

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

← back to recent threads