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

Chandra Pratap <[email protected]> Sat, 1 Aug 2026 17:42:44 +0530
Newsgroups org.kernel.vger.git
Message-ID <CA+J6zkQQsuB3LA=Zg_oEaX7Z-AMhyJf2=ZJYZER=XMPiqaea-w@mail.gmail.com>
[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?

>                 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
>