From: Junio C Hamano <gitster@pobox.com>
To: David Aguilar <davvid@gmail.com>
Cc: "Git Mailing List" <git@vger.kernel.org>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"Alan Blotz" <work@blotz.org>,
"Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Subject: Re: [PATCH 1/4] t7800-difftool: cleanup temporary repositories used by tests
Date: Mon, 20 Sep 2021 11:28:05 -0700 [thread overview]
Message-ID: <xmqqv92vayq2.fsf@gitster.g> (raw)
In-Reply-To: <20210919015729.98323-1-davvid@gmail.com> (David Aguilar's message of "Sat, 18 Sep 2021 18:57:26 -0700")
David Aguilar <davvid@gmail.com> writes:
> The "dirlinks" and "growing" repositories should not outlive the
> tests that use them.
>
> Signed-off-by: David Aguilar <davvid@gmail.com>
> ---
> t/t7800-difftool.sh | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
> index a173f564bc..a923f193da 100755
> --- a/t/t7800-difftool.sh
> +++ b/t/t7800-difftool.sh
> @@ -414,6 +414,7 @@ test_expect_success 'setup change in subdirectory' '
> test_expect_success 'difftool -d with growing paths' '
> a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &&
> git init growing &&
> + test_when_finished rm -rf growing &&
If "git init" fails after it created the directory, it will be left
behind because test_when_finished hasn't been called yet. The same
problem exists in the other hunk. Moving it above "git init" may
trigger "rm -rf X" where X does not exist yet, but that is what you
are giving the 'f'orce option there for.
Not a huge deal and no need to resend only to fix them alone,
though.
> (
> cd growing &&
> echo "test -f \"\$2/b\"" | write_script .git/test-for-b.sh &&
> @@ -646,6 +647,7 @@ test_expect_success 'difftool properly honors gitlink and core.worktree' '
> test_expect_success SYMLINKS 'difftool --dir-diff symlinked directories' '
> test_when_finished git reset --hard &&
> git init dirlinks &&
> + test_when_finished rm -rf dirlinks &&
> (
> cd dirlinks &&
> git config diff.tool checktrees &&
prev parent reply other threads:[~2021-09-20 18:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-19 1:57 [PATCH 1/4] t7800-difftool: cleanup temporary repositories used by tests David Aguilar
2021-09-19 1:57 ` [PATCH 2/4] difftool: add a missing space to the run_dir_diff() comments David Aguilar
2021-09-19 1:57 ` [PATCH 3/4] difftool: use a strbuf to create the tmpdir path David Aguilar
2021-09-19 2:17 ` Jeff King
2021-09-19 2:33 ` [PATCH v2 " David Aguilar
2021-09-20 18:35 ` Junio C Hamano
2021-09-19 9:00 ` [PATCH " Johannes Sixt
2021-09-19 18:13 ` David Aguilar
2021-09-19 18:46 ` Johannes Sixt
2021-09-19 19:28 ` David Aguilar
2021-09-19 19:50 ` Johannes Sixt
2021-09-19 1:57 ` [PATCH 4/4] difftool: fix symlink-file writing in dir-diff mode David Aguilar
2021-09-19 2:02 ` [PATCH v2 " David Aguilar
2021-09-19 2:21 ` [PATCH v3 " David Aguilar
2021-09-19 13:25 ` [PATCH 1/4] t7800-difftool: cleanup temporary repositories used by tests Ævar Arnfjörð Bjarmason
2021-09-20 18:28 ` 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=xmqqv92vayq2.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=congdanhqx@gmail.com \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=work@blotz.org \
/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).