Code

t/t4018: avoid two unnecessary sub-shell invocations
authorBrandon Casey <drafnel@gmail.com>
Fri, 10 Sep 2010 16:13:38 +0000 (11:13 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Sep 2010 16:30:14 +0000 (09:30 -0700)
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4018-diff-funcname.sh

index 620cd027982959971d7c32dc94286550d945e3df..c8e19372b00f128646b809e1f5723d88b58a3f30 100755 (executable)
@@ -37,13 +37,13 @@ for p in $builtin_patterns
 do
        test_expect_success "builtin $p pattern compiles" '
                echo "*.java diff=$p" > .gitattributes &&
-               ! ( git diff --no-index Beer.java Beer-correct.java 2>&1 |
-                       grep "fatal" > /dev/null )
+               ! { git diff --no-index Beer.java Beer-correct.java 2>&1 |
+                       grep "fatal" > /dev/null; }
        '
        test_expect_success "builtin $p wordRegex pattern compiles" '
-               ! ( git diff --no-index --word-diff \
+               ! { git diff --no-index --word-diff \
                        Beer.java Beer-correct.java 2>&1 |
-                       grep "fatal" > /dev/null )
+                       grep "fatal" > /dev/null; }
        '
 done