git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, "Derrick Stolee" <derrickstolee@github.com>,
	rsbecker@nexbridge.com, "SZEDER Gábor" <szeder.dev@gmail.com>,
	"Johannes Sixt" <j6t@kdbg.org>, "Jeff King" <peff@peff.net>
Subject: Re: [PATCH v2 3/3] config tests: fix harmless but broken "rm -r" cleanup
Date: Thu, 30 Jun 2022 13:52:21 -0700	[thread overview]
Message-ID: <xmqq8rpdeuwq.fsf@gitster.g> (raw)
In-Reply-To: <patch-v2-3.3-d3f65326701-20220630T101646Z-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Thu, 30 Jun 2022 12:18:36 +0200")

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> diff --git a/t/t1300-config.sh b/t/t1300-config.sh
> index d3d9adbb3db..c6661e61af5 100755
> --- a/t/t1300-config.sh
> +++ b/t/t1300-config.sh
> @@ -2083,12 +2083,13 @@ test_expect_success '--show-scope with --show-origin' '
>  '
>  
>  test_expect_success 'override global and system config' '
> -	test_when_finished rm -f "$HOME"/.config/git &&
> -
> +	test_when_finished rm -f \"\$HOME\"/.gitconfig &&

This does look more correct than the original.

>  	cat >"$HOME"/.gitconfig <<-EOF &&
>  	[home]
>  		config = true
>  	EOF
> +
> +	test_when_finished rm -rf \"\$HOME\"/.config/git &&
>  	mkdir -p "$HOME"/.config/git &&
>  	cat >"$HOME"/.config/git/config <<-EOF &&
>  	[xdg]

Nicely done.  Will queue.

Thanks.

      reply	other threads:[~2022-06-30 20:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21 22:21 [PATCH 0/3] tests: fix tests broken if a " " is in the checkout dir's path Ævar Arnfjörð Bjarmason
2022-06-21 22:21 ` [PATCH 1/3] tests: add missing double quotes to included library paths Ævar Arnfjörð Bjarmason
2022-06-21 22:42   ` Junio C Hamano
2022-06-21 22:21 ` [PATCH 2/3] test-lib.sh: fix prepend_var() quoting issue Ævar Arnfjörð Bjarmason
2022-06-21 22:21 ` [PATCH 3/3] config tests: fix harmless but broken "rm -r" cleanup Ævar Arnfjörð Bjarmason
2022-06-21 22:34   ` Junio C Hamano
2022-06-22  5:37     ` Junio C Hamano
2022-06-30 10:18 ` [PATCH v2 0/3] tests: fix tests broken if a " " is in the checkout dir's path Ævar Arnfjörð Bjarmason
2022-06-30 10:18   ` [PATCH v2 1/3] tests: add missing double quotes to included library paths Ævar Arnfjörð Bjarmason
2022-06-30 10:18   ` [PATCH v2 2/3] test-lib.sh: fix prepend_var() quoting issue Ævar Arnfjörð Bjarmason
2022-06-30 10:18   ` [PATCH v2 3/3] config tests: fix harmless but broken "rm -r" cleanup Ævar Arnfjörð Bjarmason
2022-06-30 20:52     ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq8rpdeuwq.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=peff@peff.net \
    --cc=rsbecker@nexbridge.com \
    --cc=szeder.dev@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).