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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ilari Liusvaara <ilari.liusvaara@xxxxxxxxxxx> wrote:
> On Thu, Apr 15, 2010 at 11:58:27AM +0200, Michael J Gruber wrote:
> > Christian Halstrick venit, vidit, dixit 15.04.2010 11:51:
> > 
> > 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.
> 
> Pack trailer hash. Apparently dumb HTTP fetch needs to bypass pack to index
> conversion somehow since index-pack aborts if trailer hash check fails (not
> to mention other failures corrupt pack may cause).

Oddly enough, http.c runs verify_pack() after the download,
but does so only after it swings the pack file into position.
If verify_pack() fails, it leaves the corrupt pack file in the
objects/pack directory.  Talk about fail.

I'll put together a patch shortly.

-- 
Shawn.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]