Skip to content

Commit 7062e91

Browse files
committed
Merge pull request #228 from StevenRoddis/patch-1
Fixed display of exponents
2 parents a43921f + be6679b commit 7062e91

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

book/07-git-tools/sections/revision-selection.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ What then?
7272
If you do happen to commit an object that hashes to the same SHA-1 value as a previous object in your repository, Git will see the previous object already in your Git database and assume it was already written.
7373
If you try to check out that object again at some point, you’ll always get the data of the first object.
7474
75-
However, you should be aware of how ridiculously unlikely this scenario is. The SHA-1 digest is 20 bytes or 160 bits. The number of randomly hashed objects needed to ensure a 50% probability of a single collision is about 2^80
76-
(the formula for determining collision probability is `p = (n(n-1)/2) * (1/2^160))`. 2^80
77-
is 1.2 x 10^24
75+
However, you should be aware of how ridiculously unlikely this scenario is. The SHA-1 digest is 20 bytes or 160 bits. The number of randomly hashed objects needed to ensure a 50% probability of a single collision is about 2^80^
76+
(the formula for determining collision probability is `p = (n(n-1)/2) * (1/2^160))`. 2^80^
77+
is 1.2 x 10^24^
7878
or 1 million billion billion. That’s 1,200 times the number of grains of sand on the earth.
7979
8080
Here’s an example to give you an idea of what it would take to get a SHA-1 collision.

0 commit comments

Comments
 (0)