Re: Git commit hash clash prevention

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stephan Beyer
Date: Thursday, October 2, 2008 - 9:04 am

Hi,

martin f krafft wrote:

Changing the committer time is the easiest way to solve this problem,
if it ever happens.

I have wondered how Git would behave if there are two files that are
not equal but have the same SHA-1. But I haven't found any such example
files to test this scenario and have not had the time to write or
look for a tool that generates them. (MD5 collisions can be generated
within 2 hours on usual home hardware and even Wikipedia links to
collided files. An intelligent search for SHA-1 collisions takes
2^63 evaluations and not 2^80 (simple birthday attack) as expected.
So it should be possible to find some random collisions and test the
behavior...)

But even if git behaves terrible useless in such situations, it
does not make any sense to guard against them, because in practice
they just do not happen. (And I think such guards will just slow git
down in the usual case.)

Regards,
  Stephan

--=20
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Git commit hash clash prevention, martin f krafft, (Thu Oct 2, 1:53 am)
Re: Git commit hash clash prevention, Thomas Rast, (Thu Oct 2, 2:18 am)
Re: Git commit hash clash prevention, Johannes Schindelin, (Thu Oct 2, 3:07 am)
Re: Git commit hash clash prevention, Jean-Luc Herren, (Thu Oct 2, 4:08 am)
Re: Git commit hash clash prevention, Jakub Narebski, (Thu Oct 2, 7:00 am)
Re: Git commit hash clash prevention, Johannes Schindelin, (Thu Oct 2, 8:39 am)
Re: Git commit hash clash prevention, Stephan Beyer, (Thu Oct 2, 9:04 am)