jyotish kumar noticed that t/t1006-cat-file.sh contains a FIXME for the %(rest) atom in "git cat-file --batch-check". The FIXME says %(rest) is incompatible with object names containing whitespace, such as HEAD:path/to/a/file with spaces, and the test uses test_expect_failure. When jyotish fed the resolved object ID ($oid) to the test instead, all 423 tests passed locally.
Jeff King pointed to a similar earlier discussion and said he implemented the %(rest) behavior himself. The limitation is documented and is how %(rest) is supposed to work. %(rest) was added long after --batch-check and had to keep the existing semantics. In his view everything works as designed and nothing needs fixing in the code, but test_expect_failure seems odd to him because it only keeps the suite from announcing a failure.
Junio C Hamano agreed. He said the test and the FIXME comment should have been fixed back then, since it was already known there was nothing to fix, and he asked whether someone in the thread could volunteer to do it.
jyotish replied that using the resolved object ID would not test how %(rest) behaves with the original object name. He volunteered to clean up the test so it handles the known limitation appropriately and drops the FIXME, and said a patch will follow.