pub(crate) use git2::{
message_trailers_strs, AutotagOption, Blob, FetchOptions, FetchPrune, Object, Revwalk, Sort,
};
#[cfg(unix)]
pub(crate) use git2::Config;
#[cfg(any(test, feature = "test"))]
pub(crate) use git2::RemoteCallbacks;
pub use git2::{
Branch, BranchType, Commit, Direction, Error, ErrorClass, ErrorCode, FileMode, ObjectType, Oid,
Reference, Remote, Repository, RepositoryInitOptions, RepositoryOpenFlags, Signature, Time,
Tree,
};
pub use git2::{
AnnotatedCommit, Diff, DiffFindOptions, DiffOptions, DiffStats, MergeAnalysis, MergeOptions,
};
pub mod build {
pub use git2::build::CheckoutBuilder;
}
pub(crate) mod transport {
pub use git2::transport::{
register, Service, SmartSubtransport, SmartSubtransportStream, Transport,
};
}
pub trait ErrorExt {
fn is_not_found(&self) -> bool;
}
impl ErrorExt for git2::Error {
fn is_not_found(&self) -> bool {
self.code() == git2::ErrorCode::NotFound
}
}