On Fri, Nov 16 2018, SZEDER Gábor wrote:

> On Fri, Nov 16, 2018 at 06:31:05PM +0100, Christian Couder wrote:
>> diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh
>> index 2ac47aa0e4..fa1d3d468b 100755
>> --- a/t/t1700-split-index.sh
>> +++ b/t/t1700-split-index.sh
>> @@ -381,6 +381,26 @@ test_expect_success 'check splitIndex.sharedIndexExpire 
>> set to "never" and "now"
>>      test $(ls .git/sharedindex.* | wc -l) -le 2
>>  '
>>
>> +test_expect_success POSIXPERM 'same mode for index & split index' '
>> +    git init same-mode &&
>> +    (
>> +            cd same-mode &&
>> +            test_commit A &&
>> +            test_modebits .git/index >index_mode &&
>> +            test_must_fail git config core.sharedRepository &&
>> +            git -c core.splitIndex=true status &&
>> +            shared=$(ls .git/sharedindex.*) &&
>
> I think the command substitution and 'ls' are unnecessary, and
>
>   shared=.git/sharedindex.*
>
> would work as well.

Looks like it. FWIW I just copy/pasted what an adjacent test was doing
for consistency, which was added in one of Christian's earlier changes
to this behavior.

But yeah, if the test can be made simpler in a portable way it would
make sense to make this a two-parter test cleanup & bug fix series.

>> +            case "$shared" in
>> +            *" "*)
>> +                    # we have more than one???
>> +                    false ;;
>> +            *)
>> +                    test_modebits "$shared" >split_index_mode &&
>> +                    test_cmp index_mode split_index_mode ;;
>> +            esac
>> +    )
>> +'
>> +
>>  while read -r mode modebits
>>  do
>>      test_expect_success POSIXPERM "split index respects 
>> core.sharedrepository $mode" '
>> --
>> 2.19.1.1053.g063ed687ac
>>

Reply via email to