On Tue, Sep 07, 2021 at 12:57:58PM +0200, Ævar Arnfjörð Bjarmason wrote: > Test for what happens when the -t and -s flags are asked to operate on > a missing object, this extends tests added in 3e370f9faf0 (t1006: add > tests for git cat-file --allow-unknown-type, 2015-05-03). The -t and > -s flags are the only ones that can be combined with > --allow-unknown-type, so let's test with and without that flag. I'm a little skeptical to have tests for all four pairs of `-t` or `-s` and "with `--allow-unknown-type` and without `--allow-unknown-type`". Testing both the presence and absence of `--allow-unknown-type` seems useful to me, but I'm not sure what testing `-t` and `-s` separately buys us. (If you really feel the need test both, I'd encourage looping like: for arg in -t -s do test_must_fail git cat-file $arg $missing_oid >out 2>err && test_must_be_empty out && test_cmp expect.err err && test_must_fail git cat-file $arg --allow-unknown-type $missing_oid >out 2>err && test_must_be_empty out && test_cmp expect.err err done && but I would be equally or perhaps even happier to just have one of the two tests). Thanks, Taylor