From 201ec78be3aec0bd77243e74b725b0fa56dd7b81 Mon Sep 17 00:00:00 2001 From: j-walther <184943049+j-walther@users.noreply.github.com> Date: Wed, 10 Dec 2025 13:00:35 +0100 Subject: [PATCH] Also call for the initial connection in shallow clones --- gix/src/clone/fetch/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gix/src/clone/fetch/mod.rs b/gix/src/clone/fetch/mod.rs index 46453d960e9..22e95bd4039 100644 --- a/gix/src/clone/fetch/mod.rs +++ b/gix/src/clone/fetch/mod.rs @@ -121,6 +121,9 @@ impl PrepareFetch { // For shallow clones without a specified ref, we need to determine the default branch. // We'll connect to get HEAD information. For Protocol V2, we need to explicitly list refs. let mut connection = remote.connect(remote::Direction::Fetch).await?; + if let Some(f) = self.configure_connection.as_mut() { + f(&mut connection).map_err(Error::RemoteConnection)?; + } // Perform handshake and try to get HEAD from it (works for Protocol V1) let _ = connection.ref_map_by_ref(&mut progress, Default::default()).await?;