{"thread":{"id":"59707","subject":"[PATCH v10 4/8] t2400: add tests to verify --quiet","startedAt":"2023-05-07T12:06:51Z","lastAt":"2023-05-07T12:06:51Z","messageCount":1,"participants":["Jacob Abel"],"isPatch":true,"patchVersion":10,"patchTotal":8},"messages":[{"id":"476721","messageId":"20230507120530.14669-5-jacobabel@nullpo.dev","threadId":"59707","inReplyTo":null,"subject":"[PATCH v10 4/8] t2400: add tests to verify --quiet","fromName":"Jacob Abel","fromEmail":"jacobabel@nullpo.dev","sentAt":"2023-05-07T12:06:33Z","receivedAt":"2023-05-07T12:06:51Z","isPatch":true,"sender":{"key":"jacobabel@nullpo.dev","avatar":"https://avatars.githubusercontent.com/u/9424043?v=4"},"body":"Add tests to verify that the command performs operations the same with\n`--quiet` as without it. Additionally verifies that all non-fatal output\nis suppressed.\n\nSigned-off-by: Jacob Abel <jacobabel@nullpo.dev>\n---\n t/t2400-worktree-add.sh | 36 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 36 insertions(+)\n\ndiff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh\nindex 0ca3ec2022..841f15f59e 100755\n--- a/t/t2400-worktree-add.sh\n+++ b/t/t2400-worktree-add.sh\n@@ -334,6 +334,13 @@ test_expect_success 'add --quiet' '\n \ttest_must_be_empty actual\n '\n\n+test_expect_success 'add --quiet -b' '\n+\ttest_when_finished \"git branch -D quietnewbranch\" &&\n+\ttest_when_finished \"git worktree remove -f -f another-worktree\" &&\n+\tgit worktree add --quiet -b quietnewbranch another-worktree 2>actual &&\n+\ttest_must_be_empty actual\n+'\n+\n test_expect_success 'local clone from linked checkout' '\n \tgit clone --local here here-clone &&\n \t( cd here-clone && git fsck )\n@@ -532,6 +539,35 @@ test_expect_success 'git worktree add --guess-remote sets up tracking' '\n \t\ttest_cmp_rev refs/remotes/repo_a/foo refs/heads/foo\n \t)\n '\n+test_expect_success 'git worktree add --guess-remote sets up tracking (quiet)' '\n+\ttest_when_finished rm -rf repo_a repo_b foo &&\n+\tsetup_remote_repo repo_a repo_b &&\n+\t(\n+\t\tcd repo_b &&\n+\t\tgit worktree add --quiet --guess-remote ../foo 2>actual &&\n+\t\ttest_must_be_empty actual\n+\t) &&\n+\t(\n+\t\tcd foo &&\n+\t\ttest_branch_upstream foo repo_a foo &&\n+\t\ttest_cmp_rev refs/remotes/repo_a/foo refs/heads/foo\n+\t)\n+'\n+\n+test_expect_success 'git worktree --no-guess-remote (quiet)' '\n+\ttest_when_finished rm -rf repo_a repo_b foo &&\n+\tsetup_remote_repo repo_a repo_b &&\n+\t(\n+\t\tcd repo_b &&\n+\t\tgit worktree add --quiet --no-guess-remote ../foo\n+\t) &&\n+\t(\n+\t\tcd foo &&\n+\t\ttest_must_fail git config \"branch.foo.remote\" &&\n+\t\ttest_must_fail git config \"branch.foo.merge\" &&\n+\t\ttest_cmp_rev ! refs/remotes/repo_a/foo refs/heads/foo\n+\t)\n+'\n\n test_expect_success 'git worktree add with worktree.guessRemote sets up tracking' '\n \ttest_when_finished rm -rf repo_a repo_b foo &&\n--\n2.39.3\n\n\n"}]}