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

Re: [PATCH 4/4] t7004: use "test-tool ref-store" for reflog inspection

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 22, 2021, 20:17 UTC
Message-ID
<xmqqfsqkied9.fsf@gitster.g>
In-Reply-To
<5d693273e5852ae9b302cb79e8dd986b6ffa10da.1640170784.git.gitgitgadget@gmail.com>
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 10 quoted lines
> From: Han-Wen Nienhuys <hanwen@google.com>
>
> This makes the test work with reftable.
>
> Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
> ...
> -	sed -e "s/^.*	//" .git/logs/refs/tags/tag_with_reflog2 >actual &&
> +	test-tool ref-store main for-each-reflog-ent refs/tags/tag_with_reflog2 | sed -e "s/^.*	//" >actual &&
>  	test_cmp expected actual
>  '

Yup, this makes perfect sense. Purists may be bothered by having anything _we_ write, like "test-tool" on the upstream of a pipe to hide its exit code, though.

After applying these four patches on top of 'master', I still see some mention of logs/refs in the t/ directory. Some of them may be a low-hanging fruit other people can take a look at and convert to the test-helper calls to help us move the reftable topic forward without stepping on your toes, hopefully?

Thanks.

t/t0060-path-utils.sh:test_git_path GIT_COMMON_DIR=bar logs/refs/bisect/foo .git/logs/refs/bisect/foo t/t0060-path-utils.sh:test_git_path GIT_COMMON_DIR=bar logs/refs bar/logs/refs t/t0060-path-utils.sh:test_git_path GIT_COMMON_DIR=bar logs/refs/ bar/logs/refs/ t/t0060-path-utils.sh:test_git_path GIT_COMMON_DIR=bar logs/refs/bisec/foo bar/logs/refs/bisec/foo t/t0060-path-utils.sh:test_git_path GIT_COMMON_DIR=bar logs/refs/bisec bar/logs/refs/bisec t/t0060-path-utils.sh:test_git_path GIT_COMMON_DIR=bar logs/refs/bisectfoo bar/logs/refs/bisectfoo t/t0060-path-utils.sh:test_git_path GIT_COMMON_DIR=bar logs/refs/heads/main bar/logs/refs/heads/main t/t1301-shared-repo.sh: actual="$(ls -l .git/logs/refs/heads/main)" && t/t1301-shared-repo.sh: echo Ooops, .git/logs/refs/heads/main is not 066x [$actual] t/t1400-update-ref.sh:rm -f .git/logs/refs/heads/main t/t1400-update-ref.sh: test_path_is_file .git/logs/refs/heads/d1/d2/r1 && t/t1400-update-ref.sh: test_must_fail git show-ref --verify -q logs/refs/heads/d1/d2 && t/t1400-update-ref.sh: test_path_is_file .git/logs/refs/heads/d1/r2 t/t1400-update-ref.sh: test_path_is_file .git/logs/refs/heads/e1/e2/r1 && t/t1400-update-ref.sh: test_must_fail git show-ref --verify -q logs/refs/heads/e1/e2 && t/t1400-update-ref.sh: test_path_is_file .git/logs/refs/heads/e1/r2 && t/t1407-worktree-ref-store.sh: mkdir -p .git/logs/refs/bisect && t/t1407-worktree-ref-store.sh: echo $ZERO_OID > .git/logs/refs/bisect/random && t/t1407-worktree-ref-store.sh: mkdir -p .git/worktrees/wt/logs/refs/bisect && t/t1407-worktree-ref-store.sh: echo $ZERO_OID > .git/worktrees/wt/logs/refs/bisect/wt-random && t/t1410-reflog.sh: # now logs/refs/heads/one is a stale directory, but t/t1410-reflog.sh: done >.git/logs/refs/heads/reflogskip && t/t3200-branch.sh: test_path_is_file .git/logs/refs/heads/d/e/f && t/t3200-branch.sh: test_cmp expect .git/logs/refs/heads/d/e/f t/t3200-branch.sh: mv .git/logs/refs/heads/u real-u && t/t3200-branch.sh: ln -s real-u .git/logs/refs/heads/u && t/t3200-branch.sh: test_path_is_file .git/logs/refs/heads/g/h/i && t/t3200-branch.sh: test_cmp expect .git/logs/refs/heads/g/h/i

Previous: Han-Wen Nienhuys via GitGitGadget
Message 9 of 9 in “Reftable test fixes 20211221”
  1. 0/4 Reftable test fixes 20211221Han-Wen Nienhuys via GitGitGadget, Dec 22, 2021
  2. 1/4 t5540: require REFFILESHan-Wen Nienhuys via GitGitGadget, Dec 22, 2021
  3. Bagas SanjayaDec 24, 2021
  4. Han-Wen NienhuysJan 10, 2022
  5. 2/4 t5550: require REFFILESHan-Wen Nienhuys via GitGitGadget, Dec 22, 2021
  6. 3/4 t7004: create separate tags for different testsHan-Wen Nienhuys via GitGitGadget, Dec 22, 2021
  7. Junio C HamanoDec 22, 2021
  8. 4/4 t7004: use "test-tool ref-store" for reflog inspectionHan-Wen Nienhuys via GitGitGadget, Dec 22, 2021
  9. Junio C HamanoDec 22, 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.