1#![deny(unsafe_code)]
16#![allow(clippy::multiple_crate_versions)]
21
22pub mod batch;
23pub mod chunker;
24pub mod delta;
25pub mod hash;
26pub mod object;
27pub mod ops;
28pub mod pack;
29#[cfg(feature = "pack-shards")]
37pub mod pack_shard;
38pub mod serialize;
39pub mod sign;
40pub mod store;
41
42pub(crate) mod atomic;
44pub mod ignore;
45pub mod index;
46pub mod refs;
47pub mod repo_lock;
48pub mod worktree;
49
50pub mod protocol;
52
53#[cfg(feature = "history-mmr")]
59pub mod history;
60
61#[cfg(feature = "sparse-checkout")]
66pub mod sparse;
67
68#[cfg(feature = "sparse-checkout")]
69pub use sparse::{
70 MAX_FILTER_PATHS as SPARSE_MAX_FILTER_PATHS, MAX_LEAVES as SPARSE_MAX_LEAVES, SPARSE_CACHE_DIR,
71 SPARSE_CACHE_MAGIC, SPARSE_CACHE_VERSION, SPARSE_WIRE_MAGIC, SPARSE_WIRE_MAX_BYTES,
72 SPARSE_WIRE_VERSION, SparseError, SparseManifest, SparseProof, SparseResponse, SparseWireError,
73 build_sparse, decode_sparse_cache, decode_sparse_response, encode_sparse_cache,
74 encode_sparse_response, hash_filter, verify_sparse,
75};
76
77pub use hash::{HASH_LEN, HEX_LEN, Hash, Hasher, to_hex, to_hex_bytes};
78pub use object::{
79 Blob, ChunkedBlob, Commit, Delta, EntryMode, IDENTITY_MAX_LEN, Identity, IdentityKind, MAGIC,
80 MkitError, Object, ObjectType, Remix, RemixSource, SCHEMA_VERSION, TAG_NAME_MAX_LEN, Tag, Tree,
81 TreeEntry,
82};
83pub use serialize::{deserialize, serialize};
84pub use sign::{
85 COMMIT_DOMAIN, KeyPair, PublicKey, REMIX_DOMAIN, SecretSeed, Signature, TAG_DOMAIN,
86 commit_signing_bytes, commit_signing_hash, remix_signing_bytes, remix_signing_hash,
87 sign_commit, sign_remix, sign_tag, tag_signing_bytes, tag_signing_hash, verify, verify_commit,
88 verify_remix, verify_tag,
89};
90pub use store::{
91 MAX_RAW_OBJECT_SIZE, MAX_TREE_DEPTH, MKIT_DIR, OBJECTS_DIR, ObjectStore, StoreError,
92 StoreResult,
93};
94
95pub use chunker::{
97 AVG_SIZE as CHUNK_AVG_SIZE, ChunkBoundary, ChunkIterator, FastCdc, MASK_L as CHUNK_MASK_L,
98 MASK_S as CHUNK_MASK_S, MAX_SIZE as CHUNK_MAX_SIZE, MIN_SIZE as CHUNK_MIN_SIZE,
99 SEED as CHUNK_SEED, chunk_boundaries, gear_table_digest,
100};
101
102pub use delta::{HEADER_LEN as DELTA_HEADER_LEN, MAX_INSERT_LEN, OP_COPY, STREAM_VERSION};
104
105pub use pack::{
107 HEADER_LEN as PACK_HEADER_LEN, MAGIC as PACK_MAGIC, MAX_ENTRIES as PACK_MAX_ENTRIES,
108 MAX_TOTAL_PAYLOAD as PACK_MAX_TOTAL_PAYLOAD, PackError, PackReader, PackWriter,
109 TRAILER_LEN as PACK_TRAILER_LEN, UnpackReport, VERSION as PACK_VERSION, pack_key,
110};
111
112pub use ignore::{IgnoreError, IgnoreList, MAX_IGNORE_FILE_BYTES, Pattern, glob_match};
114pub use index::{
115 EntryStatus, INDEX_FILE, Index, IndexEntry, IndexError, IndexResult, MAGIC as INDEX_MAGIC,
116 MAX_INDEX_BYTES, MAX_PATH_LEN, validate_index_path,
117};
118pub use refs::{
119 HEAD_FILE, HEADS_DIR, Head, REFS_DIR, Ref, RefError, RefResult, RefWriteCondition,
120 SHALLOW_FILE, TAGS_DIR, decode_ref_wire, encode_ref_wire, validate_ref_name,
121 validate_ref_prefix,
122};
123pub use repo_lock::{DEFAULT_TIMEOUT as LOCK_DEFAULT_TIMEOUT, LockError, LockResult, RepoLock};
124pub use worktree::{
125 CHUNK_THRESHOLD, MAX_FILE_BYTES, WorktreeError, WorktreeResult, read_blob, store_file_object,
126 validate_symlink_target,
127};
128
129pub use protocol::{
133 BACKOFF_CAP, BACKOFF_INITIAL, BACKOFF_MAX_ATTEMPTS, BackoffIterator, PackKey, Transport,
134 TransportError, TransportResult, is_retryable, pack_key_from_hex,
135};
136
137pub use ops::{
143 CherryPickError, CherryPickResult, Conflict, ConflictKind, DiffEntry, DiffError, DiffKind,
144 DiffResult, MergeResult, StatusEntry, StatusStaging, cherry_pick, collect_ancestor_set,
145 diff_trees, find_merge_base, is_ancestor, merge_trees, status_diff,
146};