a06673b
use crate::error::{RepoError, RepoResult};
use crate::features::RepoService;
use super::types::ArchiveFormatQuery;
pub async fn get_archive(
_svc: &RepoService,
actor: uuid::Uuid,
_repo_id: uuid::Uuid,
archive_format: &str,
ref_name: &str,
_q: ArchiveFormatQuery,
) -> RepoResult<Vec<u8>> {
let _ = actor;
match archive_format {
"tarball" | "zipball" | "bundle" => {}
other => {
return Err(RepoError::BadRequest(format!(
"unsupported archive format: {other}"
)));
}
}
if ref_name.is_empty() {
return Err(RepoError::BadRequest("ref is required".into()));
}
Err(RepoError::Internal(
"archive generation requires lib/git rewire (in progress)".into(),
))
}