1#![cfg_attr(not(test), deny(clippy::print_stdout, clippy::print_stderr))]
10#![doc = include_str!("../README.md")]
11#![deny(unsafe_code)]
29#![allow(clippy::multiple_crate_versions)]
34
35pub mod batch;
36pub mod chunker;
37pub mod delta;
38pub mod hash;
39pub mod merkle;
40pub mod object;
41pub mod ops;
42pub mod pack;
43#[cfg(feature = "pack-shards")]
51pub mod pack_shard;
52pub mod serialize;
53pub mod sign;
54pub mod store;
55pub mod transfer;
56
57pub mod layout;
61
62pub(crate) mod atomic;
64pub mod ignore;
65pub mod index;
66pub mod refs;
67pub mod repo_lock;
68pub mod worktree;
69
70pub mod protocol;
72
73#[cfg(feature = "history-mmr")]
79pub mod history;
80
81#[cfg(feature = "sparse-checkout")]
86pub mod sparse;
87
88#[cfg(feature = "sparse-checkout")]
89pub use sparse::{
90 MAX_FILTER_PATHS as SPARSE_MAX_FILTER_PATHS, MAX_LEAVES as SPARSE_MAX_LEAVES, SPARSE_CACHE_DIR,
91 SPARSE_CACHE_MAGIC, SPARSE_CACHE_VERSION, SPARSE_WIRE_MAGIC, SPARSE_WIRE_MAX_BYTES,
92 SPARSE_WIRE_VERSION, SparseError, SparseManifest, SparseProof, SparseResponse, SparseWireError,
93 build_sparse, decode_sparse_cache, decode_sparse_response, encode_sparse_cache,
94 encode_sparse_response, hash_filter, verify_sparse,
95};
96
97pub use hash::{HASH_LEN, HEX_LEN, Hash, Hasher, to_hex, to_hex_bytes};
98pub use object::{
99 Blob, ChunkedBlob, Commit, Delta, EntryMode, IDENTITY_MAX_LEN, Identity, IdentityKind, MAGIC,
100 MkitError, Object, ObjectType, Remix, RemixSource, SCHEMA_VERSION, TAG_NAME_MAX_LEN, Tag, Tree,
101 TreeEntry,
102};
103pub use serialize::{deserialize, serialize};
104pub use sign::{
105 COMMIT_DOMAIN, KeyPair, PublicKey, REMIX_DOMAIN, SecretSeed, Signature, TAG_DOMAIN,
106 commit_signing_bytes, commit_signing_hash, remix_signing_bytes, remix_signing_hash,
107 sign_commit, sign_remix, sign_tag, tag_signing_bytes, tag_signing_hash, verify, verify_commit,
108 verify_remix, verify_tag,
109};
110pub use store::{
111 MAX_RAW_OBJECT_SIZE, MAX_TREE_DEPTH, MKIT_DIR, OBJECTS_DIR, ObjectStore, StoreError,
112 StoreResult,
113};
114
115pub use chunker::{
117 AVG_SIZE as CHUNK_AVG_SIZE, ChunkBoundary, ChunkIterator, FastCdc, MASK_L as CHUNK_MASK_L,
118 MASK_S as CHUNK_MASK_S, MAX_SIZE as CHUNK_MAX_SIZE, MIN_SIZE as CHUNK_MIN_SIZE,
119 SEED as CHUNK_SEED, chunk_boundaries, gear_table_digest,
120};
121
122pub use delta::{HEADER_LEN as DELTA_HEADER_LEN, MAX_INSERT_LEN, OP_COPY, STREAM_VERSION};
124
125pub use pack::{
127 HEADER_LEN as PACK_HEADER_LEN, MAGIC as PACK_MAGIC, MAX_ENTRIES as PACK_MAX_ENTRIES,
128 MAX_TOTAL_PAYLOAD as PACK_MAX_TOTAL_PAYLOAD, PackError, PackReader, PackWriter,
129 TRAILER_LEN as PACK_TRAILER_LEN, UnpackReport, VERSION as PACK_VERSION, pack_key,
130};
131
132pub use ignore::{IgnoreError, IgnoreList, MAX_IGNORE_FILE_BYTES, Pattern, glob_match};
134pub use index::{
135 EntryStatus, INDEX_FILE, Index, IndexEntry, IndexError, IndexResult, MAGIC as INDEX_MAGIC,
136 MAX_INDEX_BYTES, MAX_PATH_LEN, validate_index_path,
137};
138pub use layout::RepoLayout;
139pub use refs::{
140 HEAD_FILE, HEADS_DIR, Head, REFS_DIR, Ref, RefError, RefResult, RefWriteCondition,
141 SHALLOW_FILE, TAGS_DIR, decode_ref_wire, encode_ref_wire, validate_ref_name,
142 validate_ref_prefix,
143};
144pub use repo_lock::{DEFAULT_TIMEOUT as LOCK_DEFAULT_TIMEOUT, LockError, LockResult, RepoLock};
145pub use worktree::{
146 CHUNK_THRESHOLD, LoadedBlob, MAX_FILE_BYTES, WorktreeError, WorktreeResult, read_blob,
147 store_file_object, validate_symlink_target,
148};
149
150pub use protocol::{
154 AdvanceOutcome, BACKOFF_CAP, BACKOFF_INITIAL, BACKOFF_MAX_ATTEMPTS, BackoffIterator, PackKey,
155 Transport, TransportError, TransportResult, is_retryable, pack_key_from_hex,
156};
157
158pub use ops::{
164 CherryPickError, CherryPickResult, Conflict, ConflictKind, DiffEntry, DiffError, DiffKind,
165 DiffResult, MergeResult, StatusEntry, StatusStaging, cherry_pick, collect_ancestor_set,
166 diff_trees, find_merge_base, is_ancestor, merge_trees, status_diff,
167};