{"thread":{"id":"25465","subject":"corrupted repo and \"git push --mirror\"","startedAt":"2010-10-18T04:08:03Z","lastAt":"2010-10-18T09:06:33Z","messageCount":2,"participants":["Sitaram Chamarty","Ilari Liusvaara"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"153691","messageId":"AANLkTikZEa4GeQHMXC2vBc8_+1208oEs7d-0KGXBw0p2@mail.gmail.com","threadId":"25465","inReplyTo":null,"subject":"corrupted repo and \"git push --mirror\"","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2010-10-18T04:08:03Z","receivedAt":"2010-10-18T04:08:03Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"This is probably a stupid question, but in the spirit of extreme\nparanoia *and* because it's kinda hard to \"try it and see\", I'm going\nto risk the ridicule :)\n\nGitolite has mirroring support now, basically using \"git push\n--mirror\".  The question I was asked, and I couldn't *confidently*\nanswer, was: what happens if the source repo suffers some corruption\nfor some reason?  Does the corruption propagate?\n\nI suspect not, but I'd appreciate corraboration and if anyone can sat\nwhat actually will happen that'd be great.\n\nSecondary question: what happens if the receiving repo is corrupt?\n\nThanks!\n\n-- \nSitaram\n"},{"id":"153700","messageId":"20101018090633.GA30603@LK-Perkele-V2.elisa-laajakaista.fi","threadId":"25465","inReplyTo":"AANLkTikZEa4GeQHMXC2vBc8_+1208oEs7d-0KGXBw0p2@mail.gmail.com","subject":"Re: corrupted repo and \"git push --mirror\"","fromName":"Ilari Liusvaara","fromEmail":"ilari.liusvaara@elisanet.fi","sentAt":"2010-10-18T09:06:33Z","receivedAt":"2010-10-18T09:06:33Z","isPatch":false,"sender":{"key":"ilari.liusvaara@elisanet.fi","avatar":null},"body":"On Mon, Oct 18, 2010 at 09:38:03AM +0530, Sitaram Chamarty wrote:\n> This is probably a stupid question, but in the spirit of extreme\n> paranoia *and* because it's kinda hard to \"try it and see\", I'm going\n> to risk the ridicule :)\n> \n> Gitolite has mirroring support now, basically using \"git push\n> --mirror\".  The question I was asked, and I couldn't *confidently*\n> answer, was: what happens if the source repo suffers some corruption\n> for some reason?  Does the corruption propagate?\n\nI think the sending behaves like normal repack. The packfile object\nCRCs must match (assuming they are available, i.e. v2 index!). Loose\nobjects might be down to zlib adler checksum.\n\nHowever, some errors in pack generation process could cause logically\ninconsistent pack to be sent. Against that, one would need to enable\nreceive-side fsck on receive (this is how the infamous jgit push bug\ncorrupted repositories).\n\nTransport errors are caught by underlying MACs or packfile SHA-1.\n\n> Secondary question: what happens if the receiving repo is corrupt?\n\nThe push might fail or it might not. And not even receive-side fsck\nnecressary catches the corruption (one would need full fsck for that).\n\n-Ilari\n"}]}