t9300: use $ZERO_OID instead of hard-coded object ID

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>
maint
brian m. carlson 2020-07-29 23:14:11 +00:00 committed by Junio C Hamano
parent 22f182442d
commit 287bb3abb3
1 changed files with 8 additions and 8 deletions

View File

@ -92,7 +92,7 @@ test_expect_success 'A: create pack from stdin' '
EOF EOF


reset refs/tags/to-be-deleted reset refs/tags/to-be-deleted
from 0000000000000000000000000000000000000000 from $ZERO_OID


tag nested tag nested
mark :6 mark :6
@ -102,7 +102,7 @@ test_expect_success 'A: create pack from stdin' '
EOF EOF


reset refs/tags/nested reset refs/tags/nested
from 0000000000000000000000000000000000000000 from $ZERO_OID


tag nested tag nested
mark :7 mark :7
@ -286,7 +286,7 @@ test_expect_success 'A: verify pack' '
test_expect_success 'A: verify diff' ' test_expect_success 'A: verify diff' '
copy=$(git rev-parse --verify master:file2) && copy=$(git rev-parse --verify master:file2) &&
cat >expect <<-EOF && cat >expect <<-EOF &&
:000000 100755 0000000000000000000000000000000000000000 $copy A copy-of-file2 :000000 100755 $ZERO_OID $copy A copy-of-file2
EOF EOF
git diff-tree -M -r master verify--import-marks >actual && git diff-tree -M -r master verify--import-marks >actual &&
compare_diff_raw expect actual && compare_diff_raw expect actual &&
@ -365,7 +365,7 @@ test_expect_success 'B: fail on invalid blob sha1' '
COMMIT COMMIT


from refs/heads/master from refs/heads/master
M 755 0000000000000000000000000000000000000001 zero1 M 755 $(echo $ZERO_OID | sed -e "s/0$/1/") zero1


INPUT_END INPUT_END


@ -620,8 +620,8 @@ test_expect_success 'D: validate new files added' '
f5id=$(echo "$file5_data" | git hash-object --stdin) && f5id=$(echo "$file5_data" | git hash-object --stdin) &&
f6id=$(echo "$file6_data" | git hash-object --stdin) && f6id=$(echo "$file6_data" | git hash-object --stdin) &&
cat >expect <<-EOF && cat >expect <<-EOF &&
:000000 100755 0000000000000000000000000000000000000000 $f6id A newdir/exec.sh :000000 100755 $ZERO_OID $f6id A newdir/exec.sh
:000000 100644 0000000000000000000000000000000000000000 $f5id A newdir/interesting :000000 100644 $ZERO_OID $f5id A newdir/interesting
EOF EOF
git diff-tree -M -r branch^ branch >actual && git diff-tree -M -r branch^ branch >actual &&
compare_diff_raw expect actual compare_diff_raw expect actual
@ -2733,7 +2733,7 @@ test_expect_success 'R: corrupt lines do not mess marks file' '
rm -f io.marks && rm -f io.marks &&
blob=$(echo hi | git hash-object --stdin) && blob=$(echo hi | git hash-object --stdin) &&
cat >expect <<-EOF && cat >expect <<-EOF &&
:3 0000000000000000000000000000000000000000 :3 $ZERO_OID
:1 $blob :1 $blob
:2 $blob :2 $blob
EOF EOF
@ -3084,7 +3084,7 @@ test_expect_success 'T: delete branch' '
git branch to-delete && git branch to-delete &&
git fast-import <<-EOF && git fast-import <<-EOF &&
reset refs/heads/to-delete reset refs/heads/to-delete
from 0000000000000000000000000000000000000000 from $ZERO_OID
EOF EOF
test_must_fail git rev-parse --verify refs/heads/to-delete test_must_fail git rev-parse --verify refs/heads/to-delete
' '