]> granicus.if.org Git - git/commitdiff
t0050: appease --chain-lint
authorJeff King <peff@peff.net>
Fri, 20 Mar 2015 10:13:25 +0000 (06:13 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Mar 2015 18:35:56 +0000 (11:35 -0700)
Some of the symlink tests check an either-or case using the
"||". This is not wrong, but fools --chain-lint into
thinking the &&-chain is broken (in fact, there is no &&
chain here).

We can solve this by wrapping the "||" inside a {} block.
This is a bit more verbose, but this construct is rare, and
the {} block helps call attention to it.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0050-filesystem.sh

index 988c3925d5e68be461b252675413671617e88809..b29d749bb7b33406b2d433d96c35d252e305eed0 100755 (executable)
@@ -33,16 +33,20 @@ test_expect_success "detection of case insensitive filesystem during repo init"
 '
 else
 test_expect_success "detection of case insensitive filesystem during repo init" '
-       test_must_fail git config --bool core.ignorecase >/dev/null ||
-       test $(git config --bool core.ignorecase) = false
+       {
+               test_must_fail git config --bool core.ignorecase >/dev/null ||
+                       test $(git config --bool core.ignorecase) = false
+       }
 '
 fi
 
 if test_have_prereq SYMLINKS
 then
 test_expect_success "detection of filesystem w/o symlink support during repo init" '
-       test_must_fail git config --bool core.symlinks ||
-       test "$(git config --bool core.symlinks)" = true
+       {
+               test_must_fail git config --bool core.symlinks ||
+               test "$(git config --bool core.symlinks)" = true
+       }
 '
 else
 test_expect_success "detection of filesystem w/o symlink support during repo init" '