Re: [PATCH GSoC v2 5/6] serve: advertise type capability

"Pablo Sabater" <[email protected]> Sat, 01 Aug 2026 23:30:43 +0200
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
On Sat Aug 1, 2026 at 2:12 PM CEST, Chandra Pratap wrote:
> [snip]
>> -# This tests depends on %(objecttype) not being supported yet, once supported
>> -# it needs to be updated.
>> -test_expect_success 'unsupported placeholder on remote returns empty string' '
>> +test_expect_success 'objecttype is supported by remote-object-info' '
>>         (
>>                 set_transport_variables "$daemon_parent" &&
>>                 cd "$daemon_parent/daemon_client_empty" &&
>>
>> -               echo "" >expect &&
>> +               echo $hello_type >expect &&
>
> Shouldn't this be echo "$hello_type" instead?

Because hello_type is "blob" (no SPs) it works but you are right, it
should have quotes.

Will fix it.

>
>>                 git cat-file --batch-command="%(objecttype)" >actual <<-EOF &&
>>                 remote-object-info "$GIT_DAEMON_URL/parent" $hello_oid
>>                 EOF
>> @@ -271,6 +273,22 @@ test_expect_success 'unsupported placeholder on remote returns empty string' '
>>         )
>>  '
>>
>> +test_expect_success 'unsupported placeholders on remote return empty string' '
>> +       (
>> +               set_transport_variables "$daemon_parent" &&
>> +               cd "$daemon_parent/daemon_client_empty" &&
>> +
>> +               fmt="%(objectmode) %(objectsize:disk) %(rest) %(deltabase)" &&
>> +
>> +               # The hardcoded SPs between the atoms are respected.
>> +               echo "   " >expect &&
>> +               git cat-file --batch-command="$fmt" >actual <<-EOF &&
>> +               remote-object-info "$GIT_DAEMON_URL/parent" $hello_oid
>> +               EOF
>> +               test_cmp expect actual
>> +       )
>> +'
>> +
>>  test_expect_success 'requesting only objectname echoes back' '
>>         (
>>                 set_transport_variables "$daemon_parent" &&
>>
>> --
>> 2.54.0
>>

Thanks,
Pablo