Skip to content

Commit

Permalink
t0050: Test autodetect core.ignorecase
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
sprohaska authored and gitster committed May 11, 2008
1 parent 2455406 commit 1c51c7d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions t/t0050-filesystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ test_description='Various filesystem issues'
auml=`printf '\xc3\xa4'`
aumlcdiar=`printf '\x61\xcc\x88'`

case_insensitive=
test_expect_success 'see if we expect ' '
test_case=test_expect_success
Expand All @@ -17,6 +18,7 @@ test_expect_success 'see if we expect ' '
if test "$(cat junk/CamelCase)" != good
then
test_case=test_expect_failure
case_insensitive=t
say "will test on a case insensitive filesystem"
fi &&
rm -fr junk &&
Expand All @@ -32,6 +34,20 @@ test_expect_success 'see if we expect ' '
rm -fr junk
'

if test "$case_insensitive"
then
test_expect_success "detection of case insensitive filesystem during repo init" '
test $(git config --bool core.ignorecase) = true
'
else
test_expect_success "detection of case insensitive filesystem during repo init" '
! git config --bool core.ignorecase >/dev/null ||
test $(git config --bool core.ignorecase) = false
'
fi

test_expect_success "setup case tests" '
touch camelcase &&
Expand Down

0 comments on commit 1c51c7d

Please sign in to comment.