git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Elia Pinto <gitter.spiros@gmail.com>
Cc: git@vger.kernel.org, martin.agren@gmail.com, pclouds@gmail.com,
	sunshine@sunshineco.com, karen@codesynthesis.com
Subject: Re: [PATCH v2] worktree: add --quiet option
Date: Thu, 16 Aug 2018 13:42:25 -0700	[thread overview]
Message-ID: <xmqqbma2dowe.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <xmqqftzedp3p.fsf@gitster-ct.c.googlers.com> (Junio C. Hamano's message of "Thu, 16 Aug 2018 13:38:02 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Elia Pinto <gitter.spiros@gmail.com> writes:
>
>> diff --git a/t/t2025-worktree-add.sh b/t/t2025-worktree-add.sh
>> index be6e09314..658647d83 100755
>> --- a/t/t2025-worktree-add.sh
>> +++ b/t/t2025-worktree-add.sh
>> @@ -252,6 +252,11 @@ test_expect_success 'add -B' '
>>  	test_cmp_rev master^ poodle
>>  '
>>  
>> +test_expect_success 'add --quiet' '
>> +	git worktree add --quiet ../foo master >expected 2>&1 &&
>> +	test_must_be_empty expected
>> +'
>
> That's misnomer.  Unless existing tests in this file are already
> bogus, I'd like to see it called 'actual', which is the name we use
> to store the actual output (to be compared with another file we
> create to hold the expected output, typically called 'expect', like
> "test_cmp expect actual").
>
> I noticed the breakage after merging this to 'pu'; it seems to die
> with "fatal: ../foo already exists" which comes from die().
>
> Oh, more seriously, since when is it OK to muck with stuff _outside_
> the $TRASH_DIRECTORY, e.g. "../foo", which would contaminate t/
> directory by creating a direct subdirectly under it?
>
> Ahh, and I suspect that it is exactly why I am seeing a failure you
> did not see---from a previously failed test cycle, "t/foo" is left
> behind because "make distclean" would not clean it (of course).
>
> Do not ever touch anywhere outside $TRASH_DIRECTORY.  Is this
> something we could enforce in our test harness, I wonder...
>
>>  test_expect_success 'local clone from linked checkout' '
>>  	git clone --local here here-clone &&
>>  	( cd here-clone && git fsck )

A quickfix (I wish I had a lot more time to spend to be extra
careful, bit I don't) I'll apply for now to get going...

 t/t2025-worktree-add.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t2025-worktree-add.sh b/t/t2025-worktree-add.sh
index 658647d834..c674697913 100755
--- a/t/t2025-worktree-add.sh
+++ b/t/t2025-worktree-add.sh
@@ -253,8 +253,8 @@ test_expect_success 'add -B' '
 '
 
 test_expect_success 'add --quiet' '
-	git worktree add --quiet ../foo master >expected 2>&1 &&
-	test_must_be_empty expected
+	git worktree add --quiet another-worktree master 2>actual &&
+	test_must_be_empty actual
 '
 
 test_expect_success 'local clone from linked checkout' '

      reply	other threads:[~2018-08-16 20:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-15 20:56 [PATCH v2] worktree: add --quiet option Elia Pinto
2018-08-15 22:36 ` Thomas Gummerer
2018-08-16  4:40 ` Martin Ågren
2018-08-16  8:25   ` Eric Sunshine
2018-08-16 10:11     ` Martin Ågren
2018-08-16  8:43 ` Eric Sunshine
2018-08-16 20:38 ` Junio C Hamano
2018-08-16 20:42   ` 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=xmqqbma2dowe.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitter.spiros@gmail.com \
    --cc=karen@codesynthesis.com \
    --cc=martin.agren@gmail.com \
    --cc=pclouds@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.
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).