git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 19, 2021, 20:16 UTC
Message-ID
<xmqqo89tyyu2.fsf@gitster.g>
In-Reply-To
<b813d6f2ad96d79a8904ef8b255d4b73ea6567d2.1629263759.git.congdanhqx@gmail.com>
Đoàn Trần Công Danh  <congdanhqx@gmail.com> 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.
Show 16 quoted lines
> 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
Previous: Đoàn Trần Công DanhNext: Đoàn Trần Công Danh
Message 5 of 11 in “t6300: don't run cat-file on non-existent object”
  1. t6300: don't run cat-file on non-existent objectĐoàn Trần Công Danh, Aug 17, 2021
  2. Johannes SchindelinAug 17, 2021
  3. 0/2 t6300: clear warning when running without gpgĐoàn Trần Công Danh, Aug 18, 2021
  4. 1/2 t6300: don't run cat-file on non-existent objectĐoàn Trần Công Danh, Aug 18, 2021
  5. Junio C HamanoAug 19, 2021
  6. 2/2 t6300: check for cat-file exit status codeĐoàn Trần Công Danh, Aug 18, 2021
  7. Junio C HamanoAug 19, 2021
  8. Johannes SchindelinAug 18, 2021
  9. 0/2 t6300: clear warning when running without gpgĐoàn Trần Công Danh, Aug 21, 2021
  10. 1/2 t6300: don't run cat-file on non-existent objectĐoàn Trần Công Danh, Aug 21, 2021
  11. 2/2 t6300: check for cat-file exit status codeĐoàn Trần Công Danh, Aug 21, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.