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

Re: [PATCH] Make some commit hashes in tests reproducible

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 7, 2020, 19:50 UTC
Message-ID
<xmqqfta33y0m.fsf@gitster.c.googlers.com>
In-Reply-To
<pull.816.git.git.1594149804313.gitgitgadget@gmail.com>
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Han-Wen Nienhuys <hanwen@google.com>
>
> Adds test_tick to t5801-remote-helpers.sh and t3203-branch-output.sh

That can be read from the patch. Also the subject tells us a half of what you want to achieve with this change (by the way, your subject is malformatted and lacks the <area>: prefix; perhaps "[PATCH] tests: make commit object names reproducible" or something), but the readers are left hanging without knowing what motivated the change. Do any test pieces in these scripts change their behaviour based on what exact object names are assigned to them, making them flaky and hard to test, and if so which one and in what way?

Thanks.
Show 42 quoted lines
> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
> ---
>     Make commit hashes in test t3203-branch-output.sh reproducible
>     
>     Signed-off-by: Han-Wen Nienhuys hanwen@google.com [hanwen@google.com]
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-816%2Fhanwen%2Frepro-hash-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-816/hanwen/repro-hash-v1
> Pull-Request: https://github.com/git/git/pull/816
>
>  t/t3203-branch-output.sh  | 2 ++
>  t/t5801-remote-helpers.sh | 2 ++
>  2 files changed, 4 insertions(+)
>
> diff --git a/t/t3203-branch-output.sh b/t/t3203-branch-output.sh
> index 71818b90f0..6b614739af 100755
> --- a/t/t3203-branch-output.sh
> +++ b/t/t3203-branch-output.sh
> @@ -4,6 +4,8 @@ test_description='git branch display tests'
>  . ./test-lib.sh
>  . "$TEST_DIRECTORY"/lib-terminal.sh
>  
> +test_tick
> +
>  test_expect_success 'make commits' '
>  	echo content >file &&
>  	git add file &&
> diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
> index 0f04b6cddb..de51584173 100755
> --- a/t/t5801-remote-helpers.sh
> +++ b/t/t5801-remote-helpers.sh
> @@ -22,6 +22,8 @@ compare_refs() {
>  	eval $fail test_cmp expect actual
>  }
>  
> +test_tick
> +
>  test_expect_success 'setup repository' '
>  	git init server &&
>  	(cd server &&
>
> base-commit: a08a83db2bf27f015bec9a435f6d73e223c21c5e
Previous: Han-Wen Nienhuys via GitGitGadgetNext: Jeff King
Message 2 of 8 in “Make some commit hashes in tests reproducible”
  1. Make some commit hashes in tests reproducibleHan-Wen Nienhuys via GitGitGadget, Jul 7, 2020
  2. Junio C HamanoJul 7, 2020
  3. Jeff KingJul 7, 2020
  4. Junio C HamanoJul 7, 2020
  5. Jeff KingJul 7, 2020
  6. Junio C HamanoJul 7, 2020
  7. Jeff KingJul 7, 2020
  8. Han-Wen NienhuysJul 8, 2020

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.