Re: git repack -A -d doesn't remove objects found in alternates?

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

 



On Fri, Sep 17, 2021 at 02:08:58AM -0700, Bryan Turner wrote:
> On Fri, Sep 17, 2021 at 1:56 AM Uwe Kleine-König
> <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> >
> > Hello,
> >
> > I wonder if I do something wrong, or if I just don't understand
> > something:
> >
> >         ukl@dude04:~/work$ git version
> >         git version 2.30.2
> >
> >         ukl@dude04:~/work$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> >         ...
> >         ukl@dude04:~/work$ cd linux/
> >         ukl@dude04:~/work/linux$ du -sh .git/objects
> >         2.6G    .git/objects
> >         ukl@dude04:~/work/linux$ echo "/ptx/work/user/git/linux.git/objects" > .git/objects/info/alternates
> >
> >         ukl@dude04:~/work/linux$ git repack -A -d
> >         ...
> >         ukl@dude04:~/work/linux$ du -sh .git/objects/
> >         2.6G    .git/objects/
> >
> > I would have expected a drastic size decrease from git repack after the
> > alternate is added.
> 
> You're missing -l on your repack command. See git help pack-objects
> and look for --local. Without -l, repack includes copies of the
> objects you're borrowing, so your pack size doesn't change.
> 
> Hope this helps!

It does. When adding -l the size reported by du goes down to 8K. Thanks
a lot.

While refering to other manpages is easy to maintain, it's hard to read
for a user.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[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]

  Powered by Linux