#![cfg_attr(not(test), deny(clippy::print_stdout, clippy::print_stderr))]
#![doc = include_str!("../README.md")]
#![deny(unsafe_code)]
#![allow(clippy::multiple_crate_versions)]
pub mod batch;
pub mod chunker;
pub mod delta;
pub mod hash;
pub mod merkle;
pub mod object;
pub mod ops;
pub mod pack;
#[cfg(feature = "pack-shards")]
pub mod pack_shard;
pub mod serialize;
pub mod sign;
pub mod store;
pub mod transfer;
pub mod layout;
pub(crate) mod atomic;
pub mod ignore;
pub mod index;
pub mod refs;
pub mod repo_lock;
pub mod worktree;
pub mod protocol;
#[cfg(feature = "history-mmr")]
pub mod history;
#[cfg(feature = "sparse-checkout")]
pub mod sparse;
#[cfg(feature = "sparse-checkout")]
pub use sparse::{
MAX_FILTER_PATHS as SPARSE_MAX_FILTER_PATHS, MAX_LEAVES as SPARSE_MAX_LEAVES, SPARSE_CACHE_DIR,
SPARSE_CACHE_MAGIC, SPARSE_CACHE_VERSION, SPARSE_WIRE_MAGIC, SPARSE_WIRE_MAX_BYTES,
SPARSE_WIRE_VERSION, SparseError, SparseManifest, SparseProof, SparseResponse, SparseWireError,
build_sparse, decode_sparse_cache, decode_sparse_response, encode_sparse_cache,
encode_sparse_response, hash_filter, verify_sparse,
};
pub use hash::{HASH_LEN, HEX_LEN, Hash, Hasher, to_hex, to_hex_bytes};
pub use object::{
Blob, ChunkedBlob, Commit, Delta, EntryMode, IDENTITY_MAX_LEN, Identity, IdentityKind, MAGIC,
MkitError, Object, ObjectType, Remix, RemixSource, SCHEMA_VERSION, TAG_NAME_MAX_LEN, Tag, Tree,
TreeEntry,
};
pub use serialize::{deserialize, serialize};
pub use sign::{
COMMIT_DOMAIN, KeyPair, PublicKey, REMIX_DOMAIN, SecretSeed, Signature, TAG_DOMAIN,
commit_signing_bytes, commit_signing_hash, remix_signing_bytes, remix_signing_hash,
sign_commit, sign_remix, sign_tag, tag_signing_bytes, tag_signing_hash, verify, verify_commit,
verify_remix, verify_tag,
};
pub use store::{
MAX_RAW_OBJECT_SIZE, MAX_TREE_DEPTH, MKIT_DIR, OBJECTS_DIR, ObjectStore, StoreError,
StoreResult,
};
pub use chunker::{
AVG_SIZE as CHUNK_AVG_SIZE, ChunkBoundary, ChunkIterator, FastCdc, MASK_L as CHUNK_MASK_L,
MASK_S as CHUNK_MASK_S, MAX_SIZE as CHUNK_MAX_SIZE, MIN_SIZE as CHUNK_MIN_SIZE,
SEED as CHUNK_SEED, chunk_boundaries, gear_table_digest,
};
pub use delta::{HEADER_LEN as DELTA_HEADER_LEN, MAX_INSERT_LEN, OP_COPY, STREAM_VERSION};
pub use pack::{
HEADER_LEN as PACK_HEADER_LEN, MAGIC as PACK_MAGIC, MAX_ENTRIES as PACK_MAX_ENTRIES,
MAX_TOTAL_PAYLOAD as PACK_MAX_TOTAL_PAYLOAD, PackError, PackReader, PackWriter,
TRAILER_LEN as PACK_TRAILER_LEN, UnpackReport, VERSION as PACK_VERSION, pack_key,
};
pub use ignore::{IgnoreError, IgnoreList, MAX_IGNORE_FILE_BYTES, Pattern, glob_match};
pub use index::{
EntryStatus, INDEX_FILE, Index, IndexEntry, IndexError, IndexResult, MAGIC as INDEX_MAGIC,
MAX_INDEX_BYTES, MAX_PATH_LEN, validate_index_path,
};
pub use layout::RepoLayout;
pub use refs::{
HEAD_FILE, HEADS_DIR, Head, REFS_DIR, Ref, RefError, RefResult, RefWriteCondition,
SHALLOW_FILE, TAGS_DIR, decode_ref_wire, encode_ref_wire, validate_ref_name,
validate_ref_prefix,
};
pub use repo_lock::{DEFAULT_TIMEOUT as LOCK_DEFAULT_TIMEOUT, LockError, LockResult, RepoLock};
pub use worktree::{
CHUNK_THRESHOLD, LoadedBlob, MAX_FILE_BYTES, WorktreeError, WorktreeResult, read_blob,
store_file_object, validate_symlink_target,
};
pub use protocol::{
AdvanceOutcome, BACKOFF_CAP, BACKOFF_INITIAL, BACKOFF_MAX_ATTEMPTS, BackoffIterator, PackKey,
Transport, TransportError, TransportResult, is_retryable, pack_key_from_hex,
};
pub use ops::{
CherryPickError, CherryPickResult, Conflict, ConflictKind, DiffEntry, DiffError, DiffKind,
DiffResult, MergeResult, StatusEntry, StatusStaging, cherry_pick, collect_ancestor_set,
diff_trees, find_merge_base, is_ancestor, merge_trees, status_diff,
};