diff --git a/t/t2004-checkout-cache-temp.sh b/t/t2004-checkout-cache-temp.sh
index 28e50d69d5f..22d1a248b65 100755
--- a/t/t2004-checkout-cache-temp.sh
+++ b/t/t2004-checkout-cache-temp.sh
@@ -198,9 +198,6 @@ test_expect_success 'checkout --temp within subdir' '
 test_expect_success 'checkout --temp symlink' '
 	rm -f path* .merge_* actual .git/index &&
 	test_ln_s_add b a &&
-	t4=$(git write-tree) &&
-	rm -f .git/index &&
-	git read-tree $t4 &&
 	git checkout-index --temp -a >actual &&
 	test_line_count = 1 actual &&
 	test $(cut "-d	" -f2 actual) = a &&