t6050: make sure we test not just commit replacement

The replacement mechanism should affect all types of objects not just commits, so make sure it deals with at least a blob. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed May 15, 2011 at 12:54 UTC abb25ac365791e16563dfd09e4ecd3e7e4dcf6b1
1 file changed +16 -2
t/t6050-replace.sh
+16 -2
@@ -236,6 +236,20 @@ test_expect_success 'index-pack and replacements' '
236 git index-pack test-*.pack
237 '
238
239 -#
240 -#
239 +test_expect_success 'not just commits' '
240 + echo replaced >file &&
241 + git add file &&
242 + REPLACED=$(git rev-parse :file) &&
243 + mv file file.replaced &&
244 +
245 + echo original >file &&
246 + git add file &&
247 + ORIGINAL=$(git rev-parse :file) &&
248 + git update-ref refs/replace/$ORIGINAL $REPLACED &&
249 + mv file file.original &&
250 +
251 + git checkout file &&
252 + test_cmp file.replaced file
253 +'
254 +
255 test_done