git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] worktree: add --quiet option

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 16, 2018, 20:38 UTC
Message-ID
<xmqqftzedp3p.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180815205630.32876-1-gitter.spiros@gmail.com>
Elia Pinto <gitter.spiros@gmail.com> writes:
Show 12 quoted lines
> 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 )
Previous: Eric SunshineNext: Junio C Hamano
Message 7 of 8 in “worktree: add --quiet option”
  1. worktree: add --quiet optionElia Pinto, Aug 15, 2018
  2. Thomas GummererAug 15, 2018
  3. Martin ÅgrenAug 16, 2018
  4. Eric SunshineAug 16, 2018
  5. Martin ÅgrenAug 16, 2018
  6. Eric SunshineAug 16, 2018
  7. Junio C HamanoAug 16, 2018
  8. Junio C HamanoAug 16, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.