Re: Starting to think about sha-256?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Krzysztof Halasa <khc@...>
Cc: David Lang <david.lang@...>, Johannes Schindelin <Johannes.Schindelin@...>, Jeff Garzik <jeff@...>, Git Mailing List <git@...>
Date: Monday, August 28, 2006 - 4:20 pm

On Mon, 28 Aug 2006, Krzysztof Halasa wrote:

Well, by definition, I wouldn't call that "inadvertent" ;)

Anyway, the way to do it (if you want to use git to document SHA1 hash 
mismatches) is to just check the files that have an identical SHA1 in. It 
will magically work!

Why? Because a git SHA1 is actually _not_ the SHA1 of the file itself, 
it's the SHA1 of the file _with_the_git_header_added_.

So if you find two files that have the same SHA1, they would also have to 
have the same length in order to actually generate the same object name. 
If they have different lenths, you can just check them into git, and 
they'll get two different git SHA1 names and you'll have a cool git 
archive that when you check the files out, they checked-out files will 
share the same SHA1 ;)

		Linus
-
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:
Starting to think about sha-256?, Jeff Garzik, (Sun Aug 27, 1:56 pm)
Re: Starting to think about sha-256?, Florian Weimer, (Tue Aug 29, 2:17 am)
Re: Starting to think about sha-256?, Krzysztof Halasa, (Sun Aug 27, 4:30 pm)
Re: Starting to think about sha-256?, Linus Torvalds, (Sun Aug 27, 4:46 pm)
Re: Starting to think about sha-256?, Johannes Schindelin, (Sun Aug 27, 6:02 pm)
Re: Starting to think about sha-256?, Linus Torvalds, (Sun Aug 27, 6:35 pm)
Re: Starting to think about sha-256?, David Lang, (Mon Aug 28, 1:27 pm)
Re: Starting to think about sha-256?, Linus Torvalds, (Mon Aug 28, 1:56 pm)
Re: Starting to think about sha-256?, Johannes Schindelin, (Mon Aug 28, 7:09 pm)
Re: Starting to think about sha-256?, Linus Torvalds, (Mon Aug 28, 7:48 pm)
Re: Starting to think about sha-256?, Krzysztof Halasa, (Mon Aug 28, 4:12 pm)
Re: Starting to think about sha-256?, Linus Torvalds, (Mon Aug 28, 4:20 pm)
Re: Starting to think about sha-256?, Krzysztof Halasa, (Mon Aug 28, 5:12 pm)
Re: Starting to think about sha-256?, Linus Torvalds, (Mon Aug 28, 5:23 pm)
Re: Starting to think about sha-256?, Jeff King, (Mon Aug 28, 2:32 pm)
Re: Starting to think about sha-256?, Linus Torvalds, (Mon Aug 28, 2:46 pm)
Re: Starting to think about sha-256?, Jeff King, (Mon Aug 28, 3:00 pm)
Re: Starting to think about sha-256?, Linus Torvalds, (Mon Aug 28, 2:06 pm)
Re: Starting to think about sha-256?, Krzysztof Halasa, (Sun Aug 27, 5:14 pm)