Skip to content

Commit 1c51c7d

Browse files
sprohaskagitster
authored andcommitted
t0050: Test autodetect core.ignorecase
Verify if core.ignorecase is automatically set to 'true' during repository initialization if the file system is case insensitive, and unset or 'false' otherwise. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 2455406 commit 1c51c7d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

t/t0050-filesystem.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ test_description='Various filesystem issues'
77
auml=`printf '\xc3\xa4'`
88
aumlcdiar=`printf '\x61\xcc\x88'`
99

10+
case_insensitive=
1011
test_expect_success 'see if we expect ' '
1112
1213
test_case=test_expect_success
@@ -17,6 +18,7 @@ test_expect_success 'see if we expect ' '
1718
if test "$(cat junk/CamelCase)" != good
1819
then
1920
test_case=test_expect_failure
21+
case_insensitive=t
2022
say "will test on a case insensitive filesystem"
2123
fi &&
2224
rm -fr junk &&
@@ -32,6 +34,20 @@ test_expect_success 'see if we expect ' '
3234
rm -fr junk
3335
'
3436

37+
if test "$case_insensitive"
38+
then
39+
test_expect_success "detection of case insensitive filesystem during repo init" '
40+
41+
test $(git config --bool core.ignorecase) = true
42+
'
43+
else
44+
test_expect_success "detection of case insensitive filesystem during repo init" '
45+
46+
! git config --bool core.ignorecase >/dev/null ||
47+
test $(git config --bool core.ignorecase) = false
48+
'
49+
fi
50+
3551
test_expect_success "setup case tests" '
3652
3753
touch camelcase &&

0 commit comments

Comments
 (0)