gix_protocol/fetch/
handshake.rs1use gix_features::progress::Progress;
2use gix_transport::{client, Service};
3use maybe_async::maybe_async;
4
5use crate::{
6 credentials,
7 handshake::{Error, Outcome},
8};
9
10#[allow(clippy::result_large_err)]
15#[maybe_async]
16pub async fn upload_pack<AuthFn, T>(
17 transport: T,
18 authenticate: AuthFn,
19 extra_parameters: Vec<(String, Option<String>)>,
20 progress: &mut impl Progress,
21) -> Result<Outcome, Error>
22where
23 AuthFn: FnMut(credentials::helper::Action) -> credentials::protocol::Result,
24 T: client::Transport,
25{
26 crate::handshake(transport, Service::UploadPack, authenticate, extra_parameters, progress).await
27}