Subject: Re: git fetch over http:// left my repo broken

From: Michael J Gruber <[email-masked]>
Date: Thu, 15 Apr 2010 11:58:27 +0200

Christian Halstrick venit, vidit, dixit 15.04.2010 11:51:
> Hi,
> 
> some days back I fetched from a github repo with http protocol and
> afterwards my local repo was broken. Since the fetch was done by a
> cronjob I don't know whether the fetch reported an error. Problem is
> that one pack file was corrupted because the github servers put the
> repo I wanted to clone into some maintenance mode while I was
> fetching. The pack file includes at the end the html source code -
> which makes these files clearly corrupted.
> 
> Git should detect this error and let the fetch fail, right?

Right. And Github should not pull your repo away from under your feet.

But still, Git should be able to deal with broken servers. The problem
is: If the server does not report any problem but simply serves a broken
pack (with correct header), how should Git notice? It would require a
fsck before accepting any new pack.

If you move away the broken pack, do you get any dangling refs?

Michael