pub mod entry;
pub mod header;
#[derive(Debug)]
pub struct DeltaBaseUnresolved(
pub gix_hash::ObjectId,
);
impl std::fmt::Display for DeltaBaseUnresolved {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"A delta chain could not be followed as the ref base with id {} could not be found",
self.0
)
}
}
impl std::error::Error for DeltaBaseUnresolved {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(const { &gix_error::ClassificationMarker::NOT_FOUND })
}
}
#[cold]
pub(super) fn allocation_error(kind: gix_error::ResourceExhaustionKind) -> gix_error::Exn {
use gix_error::ErrorExt;
gix_error::resource_exhaustion(kind, "Entry too large to fit in memory").raise_erased()
}