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

[PATCH] git-p4: prevent --chain-lint failure

From
Luke Diamand <luke@diamand.org>
Date
Apr 27, 2015, 22:20 UTC
Message-ID
<1430173228-22004-2-git-send-email-luke@diamand.org>
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
Previous: Luke DiamandNext: Jeff King
Message 2 of 3 in “Fixup test-lint error in git-p4 t9814 test”
  1. Fixup test-lint error in git-p4 t9814 testLuke Diamand, Apr 27, 2015
  2. git-p4: prevent --chain-lint failureLuke Diamand, Apr 27, 2015
  3. Jeff KingApr 27, 2015

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.