git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [ANNOUNCE] GIT 1.6.1

From
Nicolas Pitre <nico@cam.org>
Date
Dec 27, 2008, 01:56 UTC
Message-ID
<alpine.LFD.2.00.0812262025320.30266@xanadu.home>
In-Reply-To
<20081225114443.GD6115@zakalwe.fi>
On Thu, 25 Dec 2008, Heikki Orsila wrote:
Show 9 quoted lines
> On Wed, Dec 24, 2008 at 10:36:27PM -0800, Junio C Hamano wrote:
> > * The packfile machinery hopefully is more robust when dealing with
> >   corrupt packs if redundant objects involved in the corruption are
> >   available elsewhere.
> 
> Has anyone written a summary of how Git's redundancy operates?
> 
> * What would be the probability for a single bit flip to corrupt the 
> repository?

This is not something that git itself could answer. The probability depends on the quality of your hardware. Once that probability has occurred though, it is clear that your repository is then corrupted as there is hardly any redundant bits in a git repository.

> * And what is the situation where a single bit flip can not corrupt the 
> database?

The database can be resilient against most kind of corruptions if you have a redundant copy of the affected object. It will still be corrupted, but git is now able to detect corruptions gracefully and function correctly with some fallback objects. Those objects must exist in some other related repository though, and copied over to the affected repository manually. It's then possible and recommended to "fix" the corruption simply by repacking the repository at that point.

So there is no magic involved: you need to have some kind of backups, either using traditional backup solutions, or by simply having your repository cloned somewhere else. The idea of having a repository fixed with redundant objects is for those cases where you need to salvage new work that has no corresponding backup, but although corresponding objects are not corrupted, they could be delta objects which base is against old objects which happen to be corrupted.

> * When (which commands/functions) is error detection done?

Error detection is performed all the time. When it's not the more expensive SHA1 checksum, at least the zlib CRC32 is verified. What the latest git version does amongst other corruption related things is to close some small holes where some specific kind of corruptions could have been undetected and propagated from one pack to another when repacking.

Nicolas
Previous: Sitaram ChamartyNext: Steffen Prohaska
Message 14 of 15 in “[ANNOUNCE] GIT 1.6.1”
  1. Junio C HamanoDec 25, 2008
  2. Christian MICHONDec 25, 2008
  3. bill lamDec 25, 2008
  4. Junio C HamanoDec 25, 2008
  5. bill lamDec 25, 2008
  6. René ScharfeDec 25, 2008
  7. bill lamDec 25, 2008
  8. Junio C HamanoDec 25, 2008
  9. bill lamDec 26, 2008
  10. Pau Garcia i QuilesDec 25, 2008
  11. bill lamDec 26, 2008
  12. Heikki OrsilaDec 25, 2008
  13. Sitaram ChamartyDec 26, 2008
  14. Nicolas PitreDec 27, 2008
  15. [ANNOUNCE] MSYSGIT 1.6.1Steffen Prohaska, Dec 27, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.