Torsten Bögershausen <tbo...@web.de> writes:

>> +test_expect_success 'setup' '
>> +    test_tick &&
>
> Do we need a test_tick here ?

As the test does not check against exact object names, and it does
not create commits, the order among which needs to be tiebroken by
using the committer timestamp, it is not strictly necessary, but I
do not think it would hurt, either.

>
>> +    echo "checkout file" >c &&
>> +    echo "modify file" >m &&
>> +    echo "delete file" >d &&
>> +    git add . &&
>> +    git commit -m "initial commit" &&
>> +    echo "added file" >a &&
>> +    echo "modification of a file" >m &&
>> +    git rm d &&
>> +    git add . &&
>> +    git commit -m "second commit" &&
>> +    git checkout -b endCommit
>> +'
>> +
>> +test_expect_success 'reset when there is a sparse-checkout' '
>> +    echo "/c" >.git/info/sparse-checkout &&
>> +    test_config core.sparsecheckout true &&
>> +    git checkout -b resetBranch &&
>> +    test_path_is_missing m &&
>> +    test_path_is_missing a &&
>> +    test_path_is_missing d &&
>> +    git reset HEAD~1 &&
>> +    test "checkout file" = "$(cat c)" &&
>> +    test "modification of a file" = "$(cat m)" &&
>> +    test "added file" = "$(cat a)" &&
>> +    test_path_is_missing d
>> +'
>> +

Reply via email to