git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A couple of questions
@ 2005-04-18 11:51 Imre Simon
  2005-04-18 15:31 ` Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: Imre Simon @ 2005-04-18 11:51 UTC (permalink / raw)
  To: git

How will git handle a corrupted (git) file system?

For instance, what can be done if objects/xy/z{38} does not pass the
simple consistency test, i.e. if the file's sha1 hash is not xyz{38}?
This might be a serious problem because, in general, one cannot
reconstruct the contents of file objects/xy/z{38} from its name
xyz{38}.

Another problem might come up if the file does pass the simple
consistency test but the file's contents is not a valid git file,
i.e. something that

  (*) successfully inflates to a stream of bytes that forms a sequence of
  <ascii tag without space> + <space> + <ascii decimal size> +
  <byte\0> + <binary object data>.

Are there enough internal redundancies in git to allow fixing at least
some corrupted file systems? Shouldn't there be some?

Another related observation is that git is not really based on a 160 bit
hashing scheme. Indeed, only files that satisfy the above condition
(*) are allowed and this most certainly reduces the valid range of the
hashing function. I do not think that this will be a problem, but it
doesn't hurt to point this out once.

Cheers,

Imre Simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-18 16:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 11:51 A couple of questions Imre Simon
2005-04-18 15:31 ` Linus Torvalds
2005-04-18 16:23   ` Paul Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).