Git development
 help / color / mirror / Atom feed
* [Discussion] t1006: testing %(rest) with object names containing whitespace
@ 2026-10-24  6:47 jyotish kumar
  2026-10-26  1:32 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: jyotish kumar @ 2026-10-24  6:47 UTC (permalink / raw)
  To: git

Hi,

While exploring t/t1006-cat-file.sh, I came across the test for the
%(rest) format atom in git cat-file --batch-check.

The test currently contains a FIXME explaining that %(rest) is
incompatible with object names containing whitespace, such as
HEAD:path/to/a/file with spaces. It uses test_expect_failure for that
case and mentions using the resolved object ID as input instead of the
original object name.

I investigated this test and noticed that the run_tests() helper
already has access to the resolved object ID through $oid. I tried
using $oid as the input to the %(rest) test rather than $object_name.

With this change, the focused t1006-cat-file.sh test passed all 423
tests locally.

Before preparing a patch, I wanted to ask whether this is the intended
approach for testing %(rest) here, and whether removing the
conditional expected-failure logic and using the resolved object ID
would be a worthwhile improvement.

I would appreciate your guidance on whether this is worth pursuing or
if there is a reason to retain the current test behavior.

Thanks,

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-26  6:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-24  6:47 [Discussion] t1006: testing %(rest) with object names containing whitespace jyotish kumar
2026-10-26  1:32 ` Jeff King
2026-10-26  3:41   ` Junio C Hamano
2026-10-26  4:56     ` jyotish kumar
2026-10-26  6:13       ` [PATCH] t1006: skip %(rest) test for whitespace in object names jyotishkumar725015

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox