t6050: show that git cat-file --batch fails with replace objects
commit303c5d65c972de2e9d0821647b06ab595c21d355
authorChristian Couder <chriscool@tuxfamily.org>
Wed, 11 Dec 2013 07:46:08 +0000 (11 08:46 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Dec 2013 19:53:49 +0000 (12 11:53 -0800)
tree68ed99387184bb1df4f34c37e52b68f105c3fc4c
parentde7b5d6218e4b928c5a395e34e5e1de40fae2a0d
t6050: show that git cat-file --batch fails with replace objects

When --batch is passed to git cat-file, the sha1_object_info_extended()
function is used to get information about the objects passed to
git cat-file.

Unfortunately sha1_object_info_extended() doesn't take care of
object replacement properly, so it will often fail with a
message like this:

$ echo a3fb2e1845a1aaf129b7975048973414dc172173 | git cat-file --batch
a3fb2e1845a1aaf129b7975048973414dc172173 commit 231
fatal: object a3fb2e1845a1aaf129b7975048973414dc172173 change size!?

The goal of this patch is to show this breakage.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6050-replace.sh