Re: git fetch over http:// left my repo broken
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Apr 15, 2010, 09:58 UTC
- Message-ID
- <4BC6E343.2030105@drmicha.warpmail.net>
- In-Reply-To
- <g2y8c627c4f1004150251l3dc2ad17n352b149ac739d309@mail.gmail.com>
Christian Halstrick venit, vidit, dixit 15.04.2010 11:51:
Show 11 quoted lines
> 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