@@ -79,7 +79,7 @@ dce0ea858eef7ff61ad345cc5cdac62203fb3c10 refs/tags/gix-commitgraph-v0.0.0
79
79
21c9b7500cb144b3169a6537961ec2b9e865be81 refs/tags/gix-commitgraph-v0.0.0^{}"
80
80
. as_bytes ( ) ,
81
81
) ;
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 (
83
83
input,
84
84
Capabilities :: from_bytes ( b"\0 symref=HEAD:refs/heads/main symref=MISSING_NAMESPACE_TARGET:(null)" )
85
85
. expect ( "valid capabilities" )
@@ -88,6 +88,7 @@ dce0ea858eef7ff61ad345cc5cdac62203fb3c10 refs/tags/gix-commitgraph-v0.0.0
88
88
)
89
89
. await
90
90
. expect ( "no failure from valid input" ) ;
91
+ assert ! ( shallow. is_empty( ) ) ;
91
92
assert_eq ! (
92
93
out,
93
94
vec![
@@ -120,6 +121,7 @@ dce0ea858eef7ff61ad345cc5cdac62203fb3c10 refs/tags/gix-commitgraph-v0.0.0
120
121
121
122
#[ maybe_async:: test( feature = "blocking-client" , async ( feature = "async-client" , async_std:: test) ) ]
122
123
async fn extract_references_from_v1_refs_with_shallow ( ) {
124
+ use crate :: fetch:: response:: ShallowUpdate ;
123
125
let input = & mut Fixture (
124
126
"73a6868963993a3328e7d8fe94e5a6ac5078a944 HEAD
125
127
21c9b7500cb144b3169a6537961ec2b9e865be81 MISSING_NAMESPACE_TARGET
@@ -131,7 +133,7 @@ shallow 21c9b7500cb144b3169a6537961ec2b9e865be81
131
133
shallow dce0ea858eef7ff61ad345cc5cdac62203fb3c10"
132
134
. as_bytes ( ) ,
133
135
) ;
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 (
135
137
input,
136
138
Capabilities :: from_bytes ( b"\0 symref=HEAD:refs/heads/main symref=MISSING_NAMESPACE_TARGET:(null)" )
137
139
. expect ( "valid capabilities" )
@@ -140,6 +142,14 @@ shallow dce0ea858eef7ff61ad345cc5cdac62203fb3c10"
140
142
)
141
143
. await
142
144
. 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
+ ) ;
143
153
assert_eq ! (
144
154
out,
145
155
vec![
0 commit comments