Skip to content

Commit 201ec78

Browse files
committed
Also call for the initial connection in shallow clones
1 parent 264215b commit 201ec78

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gix/src/clone/fetch/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ impl PrepareFetch {
121121
// For shallow clones without a specified ref, we need to determine the default branch.
122122
// We'll connect to get HEAD information. For Protocol V2, we need to explicitly list refs.
123123
let mut connection = remote.connect(remote::Direction::Fetch).await?;
124+
if let Some(f) = self.configure_connection.as_mut() {
125+
f(&mut connection).map_err(Error::RemoteConnection)?;
126+
}
124127

125128
// Perform handshake and try to get HEAD from it (works for Protocol V1)
126129
let _ = connection.ref_map_by_ref(&mut progress, Default::default()).await?;

0 commit comments

Comments
 (0)