Re: [PATCH GSoC v2 5/6] serve: advertise type capability
- From
Pablo Sabater <pabloosabaterr@gmail.com>
- Date
- Aug 1, 2026, 21:30 UTC
- Message-ID
- <DKDXENJ2KWS8.1ZFRML59BECCW@gmail.com>
- In-Reply-To
- <CA+J6zkQQsuB3LA=Zg_oEaX7Z-AMhyJf2=ZJYZER=XMPiqaea-w@mail.gmail.com>
On Sat Aug 1, 2026 at 2:12 PM CEST, Chandra Pratap wrote:
Show 13 quoted lines
> [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.
Show 31 quoted lines
> >> 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