"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotadmin cleanup
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 3 Jul 2021 19:26:46 +0200

Download raw body.

Thread
On Sat, Jul 03, 2021 at 06:26:34PM +0200, Christian Weisgerber wrote:
> After running cleanup on a clone of got.git, git fsck still reports
> a number of dangling objects.  I guess those are packed?

Not sure. gotadmin listpack might be able to answer this.
I am not sure exactly what git fsck is doing here.

It could also be a bug in gotadmin cleanup.
I did see such git fsck warnings while writing code for this feature.
So far I could fix any such cases I've seen by correcting gotadmin
cleanup's code.

> Some minor corrections:
> 
> > --- gotadmin/gotadmin.1
> > +++ gotadmin/gotadmin.1
> ...
> > +The options for
> > +.Cm gotadmin listpack
>                 ^^^^^^^^
>                 cleanup

Oops, thanks!

> > +are as follows:
> 
> > --- /dev/null
> > +++ regress/cmdline/cleanup.sh
> ...
> > +	# cleanup -n should not remove any objects
> > +	ls -1 -R $testroot/repo/.git/objects > $testroot/objects-before
> 
> There are several instances of "ls -1".  The -1 flag only affects
> output to a terminal.  It can be dropped when stdout is redirected
> to a file.

Will do.

> > +		if [ "$ret" == "1" ]; then
> > +			break
> > +		fi
> 
> We already replaced "==" with "=" once for better POSIX adherence.
> Don't let it sneak back in.

I had forgotten about that. Thanks for reminding me.