Re: git gc / git repack not removing unused objects?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 7, 2010 at 8:11 PM, Nicolas Pitre <nico@xxxxxxxxxxx> wrote:
> On Sun, 7 Feb 2010, Jon Nelson wrote:
>> On Sat, Feb 6, 2010 at 7:16 PM, Nicolas Pitre <nico@xxxxxxxxxxx> wrote:
>> >On Sat, 6 Feb 2010, Jon Nelson wrote:
>> >>         packsizelimit = 256m
>> >
>> > Why are you using this?
>>
>> I didn't want my pack files to be too huge. I've bumped that up to 2G.
>>
>> >> pack.packsizelimit=2M
>>
>> My ~/.gitconfig normally uses 2M for easy rsyncing. In this repo I
>> thought the value was overridden by the project's config (which was
>> specifying 256m and now specifies 2048m).
>
> Why do you synchronize with rsync?  Why not a simple 'git fetch' which
> is likely to be much faster in any case?

Often I need to sync the entire config, and am frequently rsyncing
(although not in this case) rsyncing repos made with git-svn. I've had
trouble using git clone on these repos, as I really want the duplicate
repo to use the svn upstream and not the git repo it was cloned from.

..

> You previously had 2408195 packed objects and after the repack this is
> 2674504.  The difference is 266309, which incidentally is the number of
> objects 'git repack' counted.
>
> If that 266309 object count is stable between repack attempts (and it
> should), then something is failing to clean up the old packs.  If I
> remember right, you were playing with modifications to git-repack.sh
> lately?  It is well possible that you broke it.

Indeedly do I did.

The (now expected) results:

turnip:/mnt/backups.git # du -sh ; echo ; git count-objects -v ; echo
; git repack -ad ; echo ; git count-objects -v ; echo ; du -sh
204G    .

count: 0
size: 0
in-pack: 2939744
packs: 694
size-pack: 213284091
prune-packable: 0
garbage: 0

Counting objects: 266309, done.
Compressing objects: 100% (205176/205176), done.
Writing objects: 100% (266309/266309), done.
Total 266309 (delta 47781), reused 230413 (delta 47770)

count: 0
size: 0
in-pack: 266309
packs: 11
size-pack: 21590451
prune-packable: 0
garbage: 0

21G     .
turnip:/mnt/backups.git #

and of course now everything is nice and (reasonably) fast.
Thanks for the help, and pointing out that the problem was .. me.

-- 
Jon
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]