@matheusbsbs / matheus-bagliano / commits / 287bb3abb3
Fork 0

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>

brian m. carlson committed Jul 29, 2020 at 23:14 UTC 287bb3abb356cc4ca9937f966b26b3191941426c
1 file changed +8 -8
t/t9300-fast-import.sh
+8 -8
@@ -92,7 +92,7 @@ test_expect_success 'A: create pack from stdin' '
92 EOF
93
94 reset refs/tags/to-be-deleted
95 - from 0000000000000000000000000000000000000000
95 + from $ZERO_OID
96
97 tag nested
98 mark :6
@@ -102,7 +102,7 @@ test_expect_success 'A: create pack from stdin' '
102 EOF
103
104 reset refs/tags/nested
105 - from 0000000000000000000000000000000000000000
105 + from $ZERO_OID
106
107 tag nested
108 mark :7
@@ -286,7 +286,7 @@ test_expect_success 'A: verify pack' '
286 test_expect_success 'A: verify diff' '
287 copy=$(git rev-parse --verify master:file2) &&
288 cat >expect <<-EOF &&
289 - :000000 100755 0000000000000000000000000000000000000000 $copy A copy-of-file2
289 + :000000 100755 $ZERO_OID $copy A copy-of-file2
290 EOF
291 git diff-tree -M -r master verify--import-marks >actual &&
292 compare_diff_raw expect actual &&
@@ -365,7 +365,7 @@ test_expect_success 'B: fail on invalid blob sha1' '
365 COMMIT
366
367 from refs/heads/master
368 - M 755 0000000000000000000000000000000000000001 zero1
368 + M 755 $(echo $ZERO_OID | sed -e "s/0$/1/") zero1
369
370 INPUT_END
371
@@ -620,8 +620,8 @@ test_expect_success 'D: validate new files added' '
620 f5id=$(echo "$file5_data" | git hash-object --stdin) &&
621 f6id=$(echo "$file6_data" | git hash-object --stdin) &&
622 cat >expect <<-EOF &&
623 - :000000 100755 0000000000000000000000000000000000000000 $f6id A newdir/exec.sh
624 - :000000 100644 0000000000000000000000000000000000000000 $f5id A newdir/interesting
623 + :000000 100755 $ZERO_OID $f6id A newdir/exec.sh
624 + :000000 100644 $ZERO_OID $f5id A newdir/interesting
625 EOF
626 git diff-tree -M -r branch^ branch >actual &&
627 compare_diff_raw expect actual
@@ -2733,7 +2733,7 @@ test_expect_success 'R: corrupt lines do not mess marks file' '
2733 rm -f io.marks &&
2734 blob=$(echo hi | git hash-object --stdin) &&
2735 cat >expect <<-EOF &&
2736 - :3 0000000000000000000000000000000000000000
2736 + :3 $ZERO_OID
2737 :1 $blob
2738 :2 $blob
2739 EOF
@@ -3084,7 +3084,7 @@ test_expect_success 'T: delete branch' '
3084 git branch to-delete &&
3085 git fast-import <<-EOF &&
3086 reset refs/heads/to-delete
3087 - from 0000000000000000000000000000000000000000
3087 + from $ZERO_OID
3088 EOF
3089 test_must_fail git rev-parse --verify refs/heads/to-delete
3090 '