Switch all uses of $_z40 to $ZERO_OID so that they work correctly with
larger hashes. This commit was created by using the following sed
command to modify all files in the t directory except t/test-lib.sh:
sed -i 's/\$_z40/$ZERO_OID/g'
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
brian m. carlson7 years agocommitted byJunio C Hamano
@ -294,8 +294,8 @@ test_expect_success 'setup blobs which are likely to delta' '
@@ -294,8 +294,8 @@ test_expect_success 'setup blobs which are likely to delta' '
test_expect_success 'confirm that neither loose blob is a delta' '
test_expect_success 'bogus head does not fallback to all heads' '
@ -723,7 +723,7 @@ test_expect_success 'bogus head does not fallback to all heads' '
@@ -723,7 +723,7 @@ test_expect_success 'bogus head does not fallback to all heads' '
test_expect_success 'diff-index respects work tree under .git dir' '
cat >diff-index-cached.expected <<-EOF &&
:000000 100644 $_z40 $EMPTY_BLOB A sub/dir/tracked
:000000 100644 $ZERO_OID $EMPTY_BLOB A sub/dir/tracked
EOF
cat >diff-index.expected <<-EOF &&
:000000 100644 $_z40 $_z40 A sub/dir/tracked
:000000 100644 $ZERO_OID $ZERO_OID A sub/dir/tracked
EOF
(
@ -257,7 +257,7 @@ test_expect_success 'diff-index respects work tree under .git dir' '
@@ -257,7 +257,7 @@ test_expect_success 'diff-index respects work tree under .git dir' '
test_expect_success 'diff-files respects work tree under .git dir' '
cat >diff-files.expected <<-EOF &&
:100644 100644 $EMPTY_BLOB $_z40 M sub/dir/tracked
:100644 100644 $EMPTY_BLOB $ZERO_OID M sub/dir/tracked
@ -426,7 +426,7 @@ test_expect_success 'writing split index with null sha1 does not write cache tre
@@ -426,7 +426,7 @@ test_expect_success 'writing split index with null sha1 does not write cache tre
@ -15,7 +15,7 @@ test_expect_success 'checkout should not start branch from a tree' '
@@ -15,7 +15,7 @@ test_expect_success 'checkout should not start branch from a tree' '
'
test_expect_success 'checkout master from invalid HEAD' '
@ -116,7 +116,7 @@ test_expect_success 'broken main worktree still at the top' '
@@ -116,7 +116,7 @@ test_expect_success 'broken main worktree still at the top' '
@ -47,7 +47,7 @@ test_expect_success 'git branch HEAD should fail' '
@@ -47,7 +47,7 @@ test_expect_success 'git branch HEAD should fail' '
'
cat >expect <<EOF
$_z40 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
EOF
test_expect_success 'git branch -l d/e/f should create a branch and a log' '
GIT_COMMITTER_DATE="2005-05-26 23:30" \
@ -901,7 +901,7 @@ test_expect_success '--set-upstream-to notices an error to set branch as own ups
@@ -901,7 +901,7 @@ test_expect_success '--set-upstream-to notices an error to set branch as own ups
# Keep this test last, as it changes the current branch
cat >expect <<EOF
$_z40 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
$ZERO_OID $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
EOF
test_expect_success 'git checkout -b g/h/i -l should create a branch and a log' '
@ -1523,7 +1523,7 @@ test_expect_success 'cover letter auto user override' '
@@ -1523,7 +1523,7 @@ test_expect_success 'cover letter auto user override' '
@ -703,12 +703,12 @@ test_expect_success 'deletion of a non-existent ref is not fed to post-receive a
@@ -703,12 +703,12 @@ test_expect_success 'deletion of a non-existent ref is not fed to post-receive a
cd testrepo/.git &&
cat >pre-receive.expect <<-EOF &&
$orgmaster $newmaster refs/heads/master
$_z40 $_z40 refs/heads/nonexistent
$ZERO_OID $ZERO_OID refs/heads/nonexistent
EOF
cat >update.expect <<-EOF &&
refs/heads/master $orgmaster $newmaster
refs/heads/nonexistent $_z40 $_z40
refs/heads/nonexistent $ZERO_OID $ZERO_OID
EOF
cat >post-receive.expect <<-EOF &&
@ -732,11 +732,11 @@ test_expect_success 'deletion of a non-existent ref alone does trigger post-rece
@@ -732,11 +732,11 @@ test_expect_success 'deletion of a non-existent ref alone does trigger post-rece
1 A. N... 000000 100644 100644 $_z40 $HMOD .gitmodules
1 AM S.M. 000000 160000 160000 $_z40 $HSUB sub1
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM S.M. 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
@ -546,8 +546,8 @@ test_expect_success 'staged and unstaged changes in added (AM S.M.)' '
@@ -546,8 +546,8 @@ test_expect_success 'staged and unstaged changes in added (AM S.M.)' '
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $_z40 $HMOD .gitmodules
1 AM S.M. 000000 160000 160000 $_z40 $HSUB sub1
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM S.M. 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
@ -573,8 +573,8 @@ test_expect_success 'staged and untracked changes in added submodule (AM S.MU)'
@@ -573,8 +573,8 @@ test_expect_success 'staged and untracked changes in added submodule (AM S.MU)'
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $_z40 $HMOD .gitmodules
1 AM S.MU 000000 160000 160000 $_z40 $HSUB sub1
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM S.MU 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&
@ -600,8 +600,8 @@ test_expect_success 'commit within the submodule appears as new commit in super
@@ -600,8 +600,8 @@ test_expect_success 'commit within the submodule appears as new commit in super
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 A. N... 000000 100644 100644 $_z40 $HMOD .gitmodules
1 AM SC.. 000000 160000 160000 $_z40 $HSUB sub1
1 A. N... 000000 100644 100644 $ZERO_OID $HMOD .gitmodules
1 AM SC.. 000000 160000 160000 $ZERO_OID $HSUB sub1
EOF
git status --porcelain=v2 --branch --untracked-files=all >actual &&