Skip to content

Commit

Permalink
t0050: appease --chain-lint
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Mar 20, 2015
1 parent 545871b commit bfe998f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions t/t0050-filesystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" '
Expand Down

0 comments on commit bfe998f

Please sign in to comment.