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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got-portable.git
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sat, 25 Sep 2021 14:24:33 +0200

Download raw body.

Thread
  • Christian Weisgerber:

    got-portable.git

    • Stefan Sperling:

      got-portable.git

On Sat, Sep 25, 2021 at 02:01:09PM +0200, Christian Weisgerber wrote:
> The got-portable repository seems to be in an odd state:
> 
> $ git clone --bare https://git.gameoftrees.org/got-portable.git
> Cloning into bare repository 'got-portable.git'...
> Fetching objects: 21797, done.
> $ cd got-portable.git
> $ tog
> 
> tog: objects/pack/pack-163e20db1f92e16e48d330f07a064781af3eec67.idx: pack index has no corresponding pack file; pack file must be restored or 'gotadmin cleanup -p' must be run
> $ ls objects/pack/
> pack-163e20db1f92e16e48d330f07a064781af3eec67.idx
> pack-29726949885008aa3c440651d91a93e4493663fb.idx
> pack-29726949885008aa3c440651d91a93e4493663fb.pack
> pack-3879a04d9f5b8fdda599fdcbcc113d5196d4cdcc.idx
> pack-3879a04d9f5b8fdda599fdcbcc113d5196d4cdcc.pack
> pack-5b6be34fbcc5a134a000c155537411dd5d2b5a21.idx
> pack-5b6be34fbcc5a134a000c155537411dd5d2b5a21.pack
> pack-acf692510c3bab855a54386f2d6f2835579efebf.idx
> pack-acf692510c3bab855a54386f2d6f2835579efebf.pack
> pack-cc0398185eb236a411d5c86237f8836d49e8c925.idx
> pack-cc0398185eb236a411d5c86237f8836d49e8c925.pack
> pack-cd04cb5bbfa4df5a4c7ff103f997ea6327172fc1.idx
> pack-d405feeedec13186302de91c4128caab21de37c1.idx
> pack-d53c4a9a7f2004a11e810632c5cb346759fc96a5.idx
> pack-db0effffc9a29d2f33e82a46428a77a9dd4291f7.idx
> pack-f6e566bf82407724c8677e116da27109cc8438bb.idx
> pack-f92a210402ad39643af5cd427705397088a2ad1a.idx

The issue has to do with Git's "dumb" HTTP transport and will happen on
many repositories cloned that way. The Git HTTP client first downloads all
the .idx files, then downloads pack files and stops fetching packs when
it has discovered all the objects it expects to be present. This leaves
the repository in this weird state.

A repack on the server would fix this for some time but the issue will keep
coming back. If you use git:// or ssh:// URL's you won't see this problem.
And this will become somewhat of a non-issue once got clone supports HTTP.

I have looked into this but apart from writing our own HTTP client I don't
see a way for us to tell this situation apart from actual repository
corruption where pack files have gone missing for some reason.

Git doesn't seem to care about that. In my opinion their HTTP client should
be fixed to delete useless .idx files downloaded from the server.
Not that this would ever happen...