Re: About git and the use of SHA-1

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Ericsson
Date: Monday, April 28, 2008 - 11:38 pm

Henrik Austad wrote:

This depends greatly on git accepting objects with a colliding object-name,
which it doesn't. Once you have an object with a particular SHA1, it will
never get overwritten, ever, as git will believe it's about to do unnecessary
work. As such, you'd still have to create a new object, hashing to a new SHA1
and get that new object added to the kernel.

I think perhaps Andrew Morton and a few other "high brass" among the kernel
hackers can get away with pushing crud like that to Linus' public tree
(which is the de facto master copy of published kernel sources), but random
John Doe's such as you and me wouldn't stand a chance, as our patches would
get reviewed by someone who, at the end of the day, makes a living coding
Linux.



That depends. If the source of it was Linus' public tree, that would not be
very good at all. If the source was a random tarball off a random webpage
or ftp site (which would be the same as fetching and, unverified, using an
unchecked git repository), I doubt it would matter much.


Not really. What you need to verify is that
a) You cloned from somewhere you trust (kernel.org, fe)
b) The SHA1 of the commit you want to build from matches the SHA1 of the same
commit in the repository you originally cloned from.

Colliding objects can never enter a repository. Git is lazy and will reuse the
already existing colliding object with the same name instead.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
About git and the use of SHA-1, Henrik Austad, (Mon Apr 28, 9:29 am)
Re: About git and the use of SHA-1, Daniel Barkalow, (Mon Apr 28, 12:34 pm)
Re: About git and the use of SHA-1, Henrik Austad, (Mon Apr 28, 2:29 pm)
Re: About git and the use of SHA-1, Daniel Barkalow, (Mon Apr 28, 3:15 pm)
Re: About git and the use of SHA-1, Andreas Ericsson, (Mon Apr 28, 11:38 pm)
Re: About git and the use of SHA-1, Russ Dill, (Tue Apr 29, 12:09 am)
Re: About git and the use of SHA-1, Andreas Ericsson, (Tue Apr 29, 12:21 am)
Re: About git and the use of SHA-1, Sverre Rabbelier, (Tue Apr 29, 4:05 am)
Re: About git and the use of SHA-1, Andreas Ericsson, (Tue Apr 29, 5:27 am)
Re: About git and the use of SHA-1, Dmitry Potapov, (Tue Apr 29, 5:41 am)
Re: About git and the use of SHA-1, Jurko Gospodnetić, (Tue Apr 29, 5:46 am)
Re: About git and the use of SHA-1, Paolo Bonzini, (Tue Apr 29, 6:05 am)
Re: About git and the use of SHA-1, Andreas Ericsson, (Tue Apr 29, 7:37 am)
Re: About git and the use of SHA-1, Andreas Ericsson, (Tue Apr 29, 7:41 am)
Re: About git and the use of SHA-1, Paolo Bonzini, (Tue Apr 29, 7:52 am)
Re: About git and the use of SHA-1, Tom Widmer, (Tue Apr 29, 8:02 am)
Re: About git and the use of SHA-1, Geoffrey Irving, (Tue Apr 29, 8:34 am)
Re: About git and the use of SHA-1, Nicolas Pitre, (Tue Apr 29, 8:42 am)
Re: About git and the use of SHA-1, Geoffrey Irving, (Tue Apr 29, 8:59 am)
Re: About git and the use of SHA-1, Russ Dill, (Tue Apr 29, 9:21 am)
Re: About git and the use of SHA-1, Russ Dill, (Tue Apr 29, 9:24 am)
Re: About git and the use of SHA-1, Daniel Barkalow, (Tue Apr 29, 9:27 am)
Re: About git and the use of SHA-1, Nicolas Pitre, (Tue Apr 29, 9:39 am)
Re: About git and the use of SHA-1, Tom Widmer, (Tue Apr 29, 10:08 am)
Re: About git and the use of SHA-1, Geoffrey Irving, (Tue Apr 29, 10:48 am)
Re: About git and the use of SHA-1, Nicolas Pitre, (Tue Apr 29, 10:55 am)
Re: About git and the use of SHA-1, Geoffrey Irving, (Tue Apr 29, 11:02 am)
Re: About git and the use of SHA-1, Matthieu Moy, (Tue Apr 29, 11:17 am)
Re: About git and the use of SHA-1, Fredrik Skolmli, (Tue Apr 29, 11:23 am)
Re: About git and the use of SHA-1, Daniel Barkalow, (Tue Apr 29, 11:41 am)
Re: About git and the use of SHA-1, Geoffrey Irving, (Tue Apr 29, 1:31 pm)
Re: About git and the use of SHA-1, Fredrik Skolmli, (Tue Apr 29, 1:50 pm)
Re: About git and the use of SHA-1, Geoffrey Irving, (Tue Apr 29, 2:39 pm)
Re: About git and the use of SHA-1, Fredrik Skolmli, (Tue Apr 29, 2:52 pm)
Re: About git and the use of SHA-1, Martin Langhoff, (Tue Apr 29, 7:58 pm)
Re: About git and the use of SHA-1, Geoffrey Irving, (Tue Apr 29, 10:18 pm)
Re: About git and the use of SHA-1, David Brown, (Tue Apr 29, 10:47 pm)
Re: About git and the use of SHA-1, Martin Langhoff, (Tue Apr 29, 10:56 pm)