git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Eric Sunshine via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Eric Sunshine <sunshine@sunshineco.com>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH 2/3] t1509: make "setup" test more robust
Date: Thu, 8 Dec 2022 12:49:46 +0100 (CET)	[thread overview]
Message-ID: <7rs8633n-s68s-4542-o01o-033p86p51p77@tzk.qr> (raw)
In-Reply-To: <617f98dcb40d417fbb48d9c1de8fa9ab650f5370.1668999621.git.gitgitgadget@gmail.com>

Hi Eric,

On Mon, 21 Nov 2022, Eric Sunshine via GitGitGadget wrote:

> From: Eric Sunshine <sunshine@sunshineco.com>
>
> One of the t1509 setup tests is very particular about the output it
> expects from `git init`, and fails if the output differs even slightly
> which can happen easily if the script is run multiple times since it
> doesn't do a good job of cleaning up after itself (i.e. it leaves
> detritus in the root directory `/`). One bit of cruft in particular
> (`/HEAD`) makes the test fail since its presence causes `git init` to
> alter its output; rather than reporting "Initialized empty Git
> repository", it instead reports "Reinitialized existing Git repository"
> when `/HEAD` is present. Address this problem by making the test do a
> more careful job of crafting its intended initial state.

Good explanation, and the patch is obviously correct.

ACK,
Johannes

>
> Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
> ---
>  t/t1509-root-work-tree.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/t1509-root-work-tree.sh b/t/t1509-root-work-tree.sh
> index eb57fe7e19f..d0417626280 100755
> --- a/t/t1509-root-work-tree.sh
> +++ b/t/t1509-root-work-tree.sh
> @@ -243,7 +243,7 @@ say "auto bare gitdir"
>  # DESTROYYYYY!!!!!
>  test_expect_success 'setup' '
>  	rm -rf /refs /objects /info /hooks &&
> -	rm -f /expected /ls.expected /me /result &&
> +	rm -f /HEAD /expected /ls.expected /me /result &&
>  	cd / &&
>  	echo "Initialized empty Git repository in /" > expected &&
>  	git init --bare > result &&
> --
> gitgitgadget
>
>

  reply	other threads:[~2022-12-08 11:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21  3:00 [PATCH 0/3] fix t1509-root-work-tree failure Eric Sunshine via GitGitGadget
2022-11-21  3:00 ` [PATCH 1/3] t1509: fix failing "root work tree" test due to owner-check Eric Sunshine via GitGitGadget
2022-12-08 11:49   ` Johannes Schindelin
2022-11-21  3:00 ` [PATCH 2/3] t1509: make "setup" test more robust Eric Sunshine via GitGitGadget
2022-12-08 11:49   ` Johannes Schindelin [this message]
2022-11-21  3:00 ` [PATCH 3/3] t1509: facilitate repeated script invocations Eric Sunshine via GitGitGadget
2022-12-06  2:42   ` Ævar Arnfjörð Bjarmason
2022-12-06  3:23     ` Eric Sunshine
2022-12-08 12:04       ` Johannes Schindelin
2022-12-08 13:14         ` "test_atexit" v.s. "test_when_finished" (was: [PATCH 3/3] t1509: facilitate repeated script invocations) Ævar Arnfjörð Bjarmason
2022-12-09  4:46           ` "test_atexit" v.s. "test_when_finished" Junio C Hamano
2022-12-05 18:21 ` [PATCH 0/3] fix t1509-root-work-tree failure Eric Sunshine
2022-12-08 12:10   ` Johannes Schindelin
2022-12-09  4:59     ` Eric Sunshine

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=7rs8633n-s68s-4542-o01o-033p86p51p77@tzk.qr \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=sunshine@sunshineco.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).