Brandon Williams <[email protected]> writes:
> Either way you're probably going to need to be careful about how you do
> string comparison against the different parts.
Good suggestion.
>> diff --git a/t/t1300-config.sh b/t/t1300-config.sh
>> index 03c223708eb..8325d4495f4 100755
>> --- a/t/t1300-config.sh
>> +++ b/t/t1300-config.sh
>> @@ -1218,6 +1218,24 @@ test_expect_success 'last one wins: three level vars'
>> '
>> test_cmp expect actual
>> '
>>
>> +test_expect_success 'setting different case subsections ' '
>> + test_when_finished "rm -f caseSens caseSens_actual caseSens_expect" &&
>> +
>> + # v.a.r and v.A.r are not the same variable, as the middle
>> + # level of a three-level configuration variable name is
>> + # case sensitive.
In other words, perhaps add
# "V.a.r" and "v.a.R" are the same variable, though
and corresponding test here?
>> + git config -f caseSens v."A".r VAL &&
>> + git config -f caseSens v."a".r val &&
>> +
>> + echo VAL >caseSens_expect &&
>> + git config -f caseSens v."A".r >caseSens_actual &&
>> + test_cmp caseSens_expect caseSens_actual &&
>> +
>> + echo val >caseSens_expect &&
>> + git config -f caseSens v."a".r >caseSens_actual &&
>> + test_cmp caseSens_expect caseSens_actual
>> +'
>> +
>> for VAR in a .a a. a.0b a."b c". a."b c".0d
>> do
>> test_expect_success "git -c $VAR=VAL rejects invalid '$VAR'" '
>> --
>> 2.18.0.345.g5c9ce644c3-goog
>>