From: Junio C Hamano <gitster@pobox.com>
To: "Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Han-Wen Nienhuys <hanwenn@gmail.com>,
Han-Wen Nienhuys <hanwen@google.com>
Subject: Re: [PATCH 4/4] t7004: use "test-tool ref-store" for reflog inspection
Date: Wed, 22 Dec 2021 12:17:06 -0800 [thread overview]
Message-ID: <xmqqfsqkied9.fsf@gitster.g> (raw)
In-Reply-To: <5d693273e5852ae9b302cb79e8dd986b6ffa10da.1640170784.git.gitgitgadget@gmail.com> (Han-Wen Nienhuys via GitGitGadget's message of "Wed, 22 Dec 2021 10:59:44 +0000")
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 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
prev parent reply other threads:[~2021-12-22 20:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 10:59 [PATCH 0/4] Reftable test fixes 20211221 Han-Wen Nienhuys via GitGitGadget
2021-12-22 10:59 ` [PATCH 1/4] t5540: require REFFILES Han-Wen Nienhuys via GitGitGadget
2021-12-24 5:14 ` Bagas Sanjaya
2022-01-10 18:29 ` Han-Wen Nienhuys
2021-12-22 10:59 ` [PATCH 2/4] t5550: " Han-Wen Nienhuys via GitGitGadget
2021-12-22 10:59 ` [PATCH 3/4] t7004: create separate tags for different tests Han-Wen Nienhuys via GitGitGadget
2021-12-22 20:11 ` Junio C Hamano
2021-12-22 10:59 ` [PATCH 4/4] t7004: use "test-tool ref-store" for reflog inspection Han-Wen Nienhuys via GitGitGadget
2021-12-22 20:17 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqfsqkied9.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=hanwen@google.com \
--cc=hanwenn@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).