t: use hash-object --literally when created malformed objects
Many test scripts use hash-object to create malformed objects to see how we handle the results in various commands. In some cases we already have to use "hash-object --literally", because it does some rudimentary quality checks. But let's use "--literally" more consistently to future-proof these tests against hash-object learning to be more careful. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
ad5dfeac04
commit
34959d80db
@ -270,7 +270,7 @@ test_expect_success GPGSSH 'detect fudged signature with NUL' '
|
||||
git cat-file commit seventh-signed >raw &&
|
||||
cat raw >forged2 &&
|
||||
echo Qwik | tr "Q" "\000" >>forged2 &&
|
||||
git hash-object -w -t commit forged2 >forged2.commit &&
|
||||
git hash-object --literally -w -t commit forged2 >forged2.commit &&
|
||||
test_must_fail git verify-commit $(cat forged2.commit) &&
|
||||
git show --pretty=short --show-signature $(cat forged2.commit) >actual2 &&
|
||||
grep "${GPGSSH_BAD_SIGNATURE}" actual2 &&
|
||||
|
Reference in New Issue
Block a user