From: "Todd C. Miller" Subject: Re: error out when searching a pack index which lacks a corresponding pack file To: Stefan Sperling Cc: gameoftrees@openbsd.org Date: Sun, 04 Jul 2021 12:08:14 -0600 On Sun, 04 Jul 2021 12:40:28 +0200, Stefan Sperling wrote: > Some Git repository clones created by Git can somehow end up with pack index > files that lack a corresponding pack file. This came up on the #gameoftrees > IRC channel recently where the repository was cloned by git clone --bare > from a https:// URL. > > Git seems to silently ignore this problem. I think we should be treating > this as a repository corruption issue because a lonely index should never > appear intentionally. > A pack file without an index is valid, but an index without a pack file can > never be valid. When removing a pack file the corresponding index should > always be removed first before the pack file gets removed. Is there any way to recover from this other than cloning a new copy of the repo? - todd