Skip to content

Commit 287bb3a

Browse files
bk2204gitster
authored andcommitted
t9300: use $ZERO_OID instead of hard-coded object ID
Signed-off-by: brian m. carlson <[email protected]> Reviewed-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 22f1824 commit 287bb3a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

t/t9300-fast-import.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ test_expect_success 'A: create pack from stdin' '
9292
EOF
9393
9494
reset refs/tags/to-be-deleted
95-
from 0000000000000000000000000000000000000000
95+
from $ZERO_OID
9696
9797
tag nested
9898
mark :6
@@ -102,7 +102,7 @@ test_expect_success 'A: create pack from stdin' '
102102
EOF
103103
104104
reset refs/tags/nested
105-
from 0000000000000000000000000000000000000000
105+
from $ZERO_OID
106106
107107
tag nested
108108
mark :7
@@ -286,7 +286,7 @@ test_expect_success 'A: verify pack' '
286286
test_expect_success 'A: verify diff' '
287287
copy=$(git rev-parse --verify master:file2) &&
288288
cat >expect <<-EOF &&
289-
:000000 100755 0000000000000000000000000000000000000000 $copy A copy-of-file2
289+
:000000 100755 $ZERO_OID $copy A copy-of-file2
290290
EOF
291291
git diff-tree -M -r master verify--import-marks >actual &&
292292
compare_diff_raw expect actual &&
@@ -365,7 +365,7 @@ test_expect_success 'B: fail on invalid blob sha1' '
365365
COMMIT
366366
367367
from refs/heads/master
368-
M 755 0000000000000000000000000000000000000001 zero1
368+
M 755 $(echo $ZERO_OID | sed -e "s/0$/1/") zero1
369369
370370
INPUT_END
371371
@@ -620,8 +620,8 @@ test_expect_success 'D: validate new files added' '
620620
f5id=$(echo "$file5_data" | git hash-object --stdin) &&
621621
f6id=$(echo "$file6_data" | git hash-object --stdin) &&
622622
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
625625
EOF
626626
git diff-tree -M -r branch^ branch >actual &&
627627
compare_diff_raw expect actual
@@ -2733,7 +2733,7 @@ test_expect_success 'R: corrupt lines do not mess marks file' '
27332733
rm -f io.marks &&
27342734
blob=$(echo hi | git hash-object --stdin) &&
27352735
cat >expect <<-EOF &&
2736-
:3 0000000000000000000000000000000000000000
2736+
:3 $ZERO_OID
27372737
:1 $blob
27382738
:2 $blob
27392739
EOF
@@ -3084,7 +3084,7 @@ test_expect_success 'T: delete branch' '
30843084
git branch to-delete &&
30853085
git fast-import <<-EOF &&
30863086
reset refs/heads/to-delete
3087-
from 0000000000000000000000000000000000000000
3087+
from $ZERO_OID
30883088
EOF
30893089
test_must_fail git rev-parse --verify refs/heads/to-delete
30903090
'

0 commit comments

Comments
 (0)