# Re: \[PATCH v2 1/2\] t6300: don't run cat-file on non-existent object

- From: Junio C Hamano \<hidden\>
- Date: 2021-08-19 20:16:45 
- List: git
- Page: https://ratatoskr.run/git/2021/08/7899736
- Thread: https://ratatoskr.run/git/2021/08/7899736/t.md

```text
Đoàn Trần Công Danh  [ref] writes:

> In t6300, some tests are guarded behind some prerequisites.
> Thus, objects created by those tests ain't available if those
> prerequisites is unsatistified.  Attempting to run "cat-file"

is -> are.

> on those objects will run into failure.
>
> In fact, running t6300 in an environment without gpg(1),
> we'll see those warnings:
>
> 	fatal: Not a valid object name refs/tags/signed-empty
> 	fatal: Not a valid object name refs/tags/signed-short
> 	fatal: Not a valid object name refs/tags/signed-long
>
> Let's put those commands into the real tests, in order to:
>
> * skip their execution if prerequisites aren't satistified.
> * check their exit status code
>
> The expected value for objects with type: commit needs to be
> computed outside the test because we can't relies on "$3" there.

relies -> rely
```
