Skip to content

Commit 40d5a95

Browse files
authored
Merge branch 'GitoxideLabs:main' into raw-email-attempt-fix
2 parents 678bba4 + 3c2b422 commit 40d5a95

File tree

7 files changed

+8
-39
lines changed

7 files changed

+8
-39
lines changed

gitoxide-core/src/pack/receive.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ where
6464
.is_some();
6565

6666
let agent = gix::protocol::agent(gix::env::agent());
67-
let mut handshake: gix::protocol::Handshake = gix::protocol::fetch::handshake(
67+
let mut handshake = gix::protocol::handshake(
6868
&mut transport.inner,
69+
transport::Service::UploadPack,
6970
gix::protocol::credentials::builtin,
7071
vec![("agent".into(), Some(agent.clone()))],
7172
&mut progress,

gix-protocol/src/fetch/handshake.rs

Lines changed: 0 additions & 28 deletions
This file was deleted.

gix-protocol/src/fetch/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ pub mod response;
3434
#[cfg(feature = "fetch")]
3535
pub(crate) mod function;
3636

37-
#[cfg(any(feature = "blocking-client", feature = "async-client"))]
38-
#[cfg(feature = "handshake")]
39-
mod handshake;
40-
#[cfg(any(feature = "blocking-client", feature = "async-client"))]
41-
#[cfg(feature = "handshake")]
42-
pub use handshake::upload_pack as handshake;
43-
4437
#[cfg(feature = "fetch")]
4538
pub mod negotiate;
4639

gix-protocol/src/handshake/function.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ use crate::{credentials, handshake::refs};
1414
/// turns out to be required. `extra_parameters` are the parameters `(name, optional value)` to add to the handshake,
1515
/// each time it is performed in case authentication is required.
1616
/// `progress` is used to inform about what's currently happening.
17+
/// The `service` tells the server whether to be in 'send' or 'receive' mode.
1718
#[allow(clippy::result_large_err)]
1819
#[maybe_async]
1920
pub async fn handshake<AuthFn, T>(

gix-protocol/src/handshake/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ mod error {
123123

124124
use crate::{credentials, handshake::refs};
125125

126-
/// The error returned by [`handshake()`][crate::fetch::handshake()].
126+
/// The error returned by [`handshake()`][crate::handshake()].
127127
#[derive(Debug, thiserror::Error)]
128128
#[allow(missing_docs)]
129129
pub enum Error {

gix-protocol/tests/protocol/fetch/_impl.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ mod fetch_fn {
7979
refs,
8080
v1_shallow_updates: _ignored_shallow_updates_as_it_is_deprecated,
8181
capabilities,
82-
} = gix_protocol::fetch::handshake(
82+
} = gix_protocol::handshake(
8383
&mut transport,
84+
gix_transport::Service::UploadPack,
8485
authenticate,
8586
delegate.handshake_extra_parameters(),
8687
&mut progress,

gix/src/remote/connection/ref_map.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ where
143143
if let Some(config) = self.transport_options.as_ref() {
144144
self.transport.inner.configure(&**config)?;
145145
}
146-
let mut handshake: gix_protocol::Handshake = gix_protocol::fetch::handshake(
146+
let mut handshake = gix_protocol::handshake(
147147
&mut self.transport.inner,
148+
gix_transport::Service::UploadPack,
148149
authenticate,
149150
handshake_parameters,
150151
&mut progress,

0 commit comments

Comments
 (0)