git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luke Diamand <luke@diamand.org>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>,
	Luke Diamand <luke@diamand.org>
Subject: [PATCH] git-p4: prevent --chain-lint failure
Date: Mon, 27 Apr 2015 23:20:28 +0100	[thread overview]
Message-ID: <1430173228-22004-2-git-send-email-luke@diamand.org> (raw)
In-Reply-To: <1430173228-22004-1-git-send-email-luke@diamand.org>

t9814 has a test that simply sets up a pre-requisite for
another test, and as such, always succeeds. The way it was
written doesn't quite work with the test lint checks introduced
with the --chain-lint option.

Add an additional layer of {} to prevent the --chain-lint
code getting confused.

Signed-off-by: Luke Diamand <luke@diamand.org>
---
 t/t9814-git-p4-rename.sh | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/t/t9814-git-p4-rename.sh b/t/t9814-git-p4-rename.sh
index 99bb71b..14f9dc3 100755
--- a/t/t9814-git-p4-rename.sh
+++ b/t/t9814-git-p4-rename.sh
@@ -227,13 +227,15 @@ test_expect_success 'detect copies' '
 # See if configurables can be set, and in particular if the run.move.allow
 # variable exists, which allows admins to disable the "p4 move" command.
 test_expect_success 'p4 configure command and run.move.allow are available' '
-	p4 configure show run.move.allow >out ; retval=$? &&
-	test $retval = 0 &&
-	{
-		egrep ^run.move.allow: out &&
-		test_set_prereq P4D_HAVE_CONFIGURABLE_RUN_MOVE_ALLOW ||
-		true
-	} || true
+    {
+	    p4 configure show run.move.allow >out ; retval=$? &&
+	    test $retval = 0 &&
+	    {
+		    egrep ^run.move.allow: out &&
+		    test_set_prereq P4D_HAVE_CONFIGURABLE_RUN_MOVE_ALLOW ||
+		    true
+	    } || true
+    }
 '
 
 # If move can be disabled, turn it off and test p4 move handling
-- 
2.3.4.48.g223ab37

  reply	other threads:[~2015-04-27 22:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 22:20 [PATCH] Fixup test-lint error in git-p4 t9814 test Luke Diamand
2015-04-27 22:20 ` Luke Diamand [this message]
2015-04-27 23:02   ` [PATCH] git-p4: prevent --chain-lint failure Jeff King
2015-04-28  6:30     ` [PATCHv2] Fixup test-lint error in git-p4 t9814 test Luke Diamand
2015-04-28  7:21       ` [PATCHv3] " Luke Diamand
2015-04-28  7:21       ` [PATCHv3] git-p4: t9814: prevent --chain-lint failure Luke Diamand
2015-04-28  6:30     ` [PATCHv2] " Luke Diamand

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=1430173228-22004-2-git-send-email-luke@diamand.org \
    --to=luke@diamand.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).