Skip to content

Commit bfe998f

Browse files
peffgitster
authored andcommitted
t0050: appease --chain-lint
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 545871b commit bfe998f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

t/t0050-filesystem.sh

+8-4
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,20 @@ test_expect_success "detection of case insensitive filesystem during repo init"
3333
'
3434
else
3535
test_expect_success "detection of case insensitive filesystem during repo init" '
36-
test_must_fail git config --bool core.ignorecase >/dev/null ||
37-
test $(git config --bool core.ignorecase) = false
36+
{
37+
test_must_fail git config --bool core.ignorecase >/dev/null ||
38+
test $(git config --bool core.ignorecase) = false
39+
}
3840
'
3941
fi
4042

4143
if test_have_prereq SYMLINKS
4244
then
4345
test_expect_success "detection of filesystem w/o symlink support during repo init" '
44-
test_must_fail git config --bool core.symlinks ||
45-
test "$(git config --bool core.symlinks)" = true
46+
{
47+
test_must_fail git config --bool core.symlinks ||
48+
test "$(git config --bool core.symlinks)" = true
49+
}
4650
'
4751
else
4852
test_expect_success "detection of filesystem w/o symlink support during repo init" '

0 commit comments

Comments
 (0)