Thread (93 messages) 93 messages, 10 authors, 2018-08-29

[PATCH 12/29] t9401: drop unnecessary nested subshell

STALE2956d

From: Eric Sunshine <hidden>
Date: 2018-06-26 07:31:07
Subsystem: the rest · Maintainer: Linus Torvalds

This test employs an unnecessary nested subshell:

    (cd foo &&
     statement1 &&
     (cd bar &&
      statement2))

An upcoming change will teach --chain-lint to check the &&-chain in
subshells. The check works by performing textual transformations on the
test to link the subshell body directly into the parent's &&-chain. It
employs heuristics to identify the extent of a subshell, however,
closing two subshells on a single line like this will fool it.

Rather than extending the heuristics even further for this one-off case,
just drop the pointless nested subshell.

Signed-off-by: Eric Sunshine <redacted>
---
 t/t9401-git-cvsserver-crlf.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
index 84787eee9a..8b8d7ac34a 100755
--- a/t/t9401-git-cvsserver-crlf.sh
+++ b/t/t9401-git-cvsserver-crlf.sh
@@ -288,9 +288,9 @@ test_expect_success 'add bin (guess)' '
 test_expect_success 'remove files (guess)' '
     (cd cvswork &&
     GIT_CONFIG="$git_config" cvs -Q rm -f subdir/file.h &&
-    (cd subdir &&
+    cd subdir &&
     GIT_CONFIG="$git_config" cvs -Q rm -f withCr.bin
-    )) &&
+    ) &&
     marked_as cvswork/subdir withCr.bin -kb &&
     marked_as cvswork/subdir file.h ""
 '
-- 
2.18.0.419.gfe4b301394
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help