diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-07-29 23:13:53 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-30 09:16:45 -0700 |
commit | 800e6a7041961b91fb97ab5dfd440983953fe75c (patch) | |
tree | ffef61bf175eb5be76440cfbec62fdd0e42fdaad /ident.c | |
parent | t3305: make hash agnostic (diff) | |
download | tgif-800e6a7041961b91fb97ab5dfd440983953fe75c.tar.xz |
t3404: prepare 'short SHA-1 collision' tests for SHA-256
The idea of the magic value "ac4f2ee" in this test is to make the
reworded commit `collide2` have the same shortened ID as the commit
`collide3`.
To port the same idea to the SHA-256 version of Git, we therefore need
another magic value that causes the same collision, but this time with
the SHA-256 version of the commit IDs.
In this patch, we add code guarded by `GIT_TEST_FIND_COLLIDER` to do
exactly that. Essentially, a large number of integers is appended to the
commit message "collide2" to find such a collision. To make it easier to
find such a collision, we reduce the number of digits to 4.
As the tests are no longer dependent on SHA-1, we also rename their
titles to talk about "commit IDs" instead of "SHA-1s".
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ident.c')
0 files changed, 0 insertions, 0 deletions