@@ -79,7 +79,7 @@ dce0ea858eef7ff61ad345cc5cdac62203fb3c10 refs/tags/gix-commitgraph-v0.0.0
797921c9b7500cb144b3169a6537961ec2b9e865be81 refs/tags/gix-commitgraph-v0.0.0^{}"
8080 . as_bytes ( ) ,
8181 ) ;
82- let out = refs:: from_v1_refs_received_as_part_of_handshake_and_capabilities (
82+ let ( out, shallow ) = refs:: from_v1_refs_received_as_part_of_handshake_and_capabilities (
8383 input,
8484 Capabilities :: from_bytes ( b"\0 symref=HEAD:refs/heads/main symref=MISSING_NAMESPACE_TARGET:(null)" )
8585 . expect ( "valid capabilities" )
@@ -88,6 +88,7 @@ dce0ea858eef7ff61ad345cc5cdac62203fb3c10 refs/tags/gix-commitgraph-v0.0.0
8888 )
8989 . await
9090 . expect ( "no failure from valid input" ) ;
91+ assert ! ( shallow. is_empty( ) ) ;
9192 assert_eq ! (
9293 out,
9394 vec![
@@ -120,6 +121,7 @@ dce0ea858eef7ff61ad345cc5cdac62203fb3c10 refs/tags/gix-commitgraph-v0.0.0
120121
121122#[ maybe_async:: test( feature = "blocking-client" , async ( feature = "async-client" , async_std:: test) ) ]
122123async fn extract_references_from_v1_refs_with_shallow ( ) {
124+ use crate :: fetch:: response:: ShallowUpdate ;
123125 let input = & mut Fixture (
124126 "73a6868963993a3328e7d8fe94e5a6ac5078a944 HEAD
12512721c9b7500cb144b3169a6537961ec2b9e865be81 MISSING_NAMESPACE_TARGET
@@ -131,7 +133,7 @@ shallow 21c9b7500cb144b3169a6537961ec2b9e865be81
131133shallow dce0ea858eef7ff61ad345cc5cdac62203fb3c10"
132134 . as_bytes ( ) ,
133135 ) ;
134- let out = refs:: from_v1_refs_received_as_part_of_handshake_and_capabilities (
136+ let ( out, shallow ) = refs:: from_v1_refs_received_as_part_of_handshake_and_capabilities (
135137 input,
136138 Capabilities :: from_bytes ( b"\0 symref=HEAD:refs/heads/main symref=MISSING_NAMESPACE_TARGET:(null)" )
137139 . expect ( "valid capabilities" )
@@ -140,6 +142,14 @@ shallow dce0ea858eef7ff61ad345cc5cdac62203fb3c10"
140142 )
141143 . await
142144 . expect ( "no failure from valid input" ) ;
145+
146+ assert_eq ! (
147+ shallow,
148+ vec![
149+ ShallowUpdate :: Shallow ( oid( "21c9b7500cb144b3169a6537961ec2b9e865be81" ) ) ,
150+ ShallowUpdate :: Shallow ( oid( "dce0ea858eef7ff61ad345cc5cdac62203fb3c10" ) )
151+ ]
152+ ) ;
143153 assert_eq ! (
144154 out,
145155 vec![
0 commit comments