All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"CB Bailey" <cb@hashpling.org>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH] t2024: mark test using "checkout -p" with PERL prerequisite
Date: Sat, 18 Aug 2018 07:01:47 +0000	[thread overview]
Message-ID: <20180818070147.14026-1-avarab@gmail.com> (raw)
In-Reply-To: <20180818044310.14446-1-cb@hashpling.org>

Checkout with the -p switch uses the "add interactive" framework which
is written in Perl.

One test added in 8d7b558bae ("checkout & worktree: introduce
checkout.defaultRemote", 2018-06-05) didn't declare the PERL
prerequisite, breaking the test when built with NO_PERL.

Reported-by: CB Bailey <cb@hashpling.org>
Signed-off-by: CB Bailey <cb@hashpling.org>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---

On Sat, Aug 18, 2018 at 6:43 AM, CB Bailey <cb@hashpling.org> wrote:
> checkout with the -p switch uses the "add interactive" framework which
> is written in Perl. Add a PERL prerequisite to skip this test when built
> with NO_PERL.

Thanks, and sorry about my buggy code. I didn't consider the
interaction between -p and NO_PERL.

Your patch works, but I think just splitting the test up is better, so
we're not skipping things unrelated to "checkout -p" under NO_PERL.

I added your SOB since I stole significant parts of your commit
message.

Junio: We'd want one patch or the other before 2.19 so that release
doesn't break tests under NO_PERL.

 t/t2024-checkout-dwim.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh
index f79dfbbdd6..69b6774d10 100755
--- a/t/t2024-checkout-dwim.sh
+++ b/t/t2024-checkout-dwim.sh
@@ -86,8 +86,13 @@ test_expect_success 'checkout of branch from multiple remotes fails with advice'
 		checkout foo 2>stderr &&
 	test_branch master &&
 	status_uno_is_clean &&
-	test_i18ngrep ! "^hint: " stderr &&
-	# Make sure the likes of checkout -p do not print this hint
+	test_i18ngrep ! "^hint: " stderr
+'
+
+test_expect_success PERL 'checkout -p with multiple remotes does not print advice' '
+	git checkout -B master &&
+	test_might_fail git branch -D foo &&
+
 	git checkout -p foo 2>stderr &&
 	test_i18ngrep ! "^hint: " stderr &&
 	status_uno_is_clean
-- 
2.18.0.865.gffc8e1a3cd6


      reply	other threads:[~2018-08-18  7:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-18  4:43 [PATCH] t2024: mark test using "checkout -p" with PERL prerequisite CB Bailey
2018-08-18  7:01 ` Ævar Arnfjörð Bjarmason [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

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

  git send-email \
    --in-reply-to=20180818070147.14026-1-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=cb@hashpling.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.