use crate::OutputFormat; use git_features::progress::Progress; use std::{io, path::PathBuf, str::FromStr}; #[derive(PartialEq, Debug)] pub enum Protocol { V1, V2, } impl FromStr for Protocol { type Err = String; fn from_str(s: &str) -> Result { Ok(match s { "1" => Protocol::V1, "2" => Protocol::V2, _ => return Err(format!("Unsupported protocol version '{}', choose '1' or '2'", s)), }) } } pub struct Context { pub thread_limit: Option, pub format: OutputFormat, pub out: W, } pub fn receive( _protocol: Option, _url: &str, _directory: Option, _progress: P, _ctx: Context, ) -> anyhow::Result<()> where P: Progress,

::SubProgress: Send + 'static, <

::SubProgress as Progress>::SubProgress: Send, { unimplemented!("pack-receive") }