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 admission;
36pub mod batch;
37pub mod chunker;
38pub mod delta;
39pub mod hash;
40pub mod merkle;
41pub mod object;
42pub mod ops;
43pub mod pack;
44#[cfg(feature = "pack-shards")]
52pub mod pack_shard;
53pub mod serialize;
54pub mod sign;
55pub mod store;
56pub mod transfer;
57pub mod upload_parts;
60pub mod verify;
66pub mod write_auth;
67
68pub mod layout;
72
73pub(crate) mod atomic;
75pub mod ignore;
76pub mod index;
77pub mod refs;
78pub mod repo_identity;
81pub mod repo_lock;
82pub mod worktree;
83
84pub mod protocol;
86
87#[cfg(feature = "history-mmr")]
93pub mod history;
94
95#[cfg(feature = "sparse-checkout")]
100pub mod sparse;
101
102#[cfg(feature = "sparse-checkout")]
103pub use sparse::{
104 MAX_FILTER_PATHS as SPARSE_MAX_FILTER_PATHS, MAX_LEAVES as SPARSE_MAX_LEAVES, SPARSE_CACHE_DIR,
105 SPARSE_CACHE_MAGIC, SPARSE_CACHE_VERSION, SPARSE_WIRE_MAGIC, SPARSE_WIRE_MAX_BYTES,
106 SPARSE_WIRE_VERSION, SparseError, SparseManifest, SparseProof, SparseResponse, SparseWireError,
107 VerifiedSparseTree, build_sparse, decode_sparse_cache, decode_sparse_response,
108 encode_sparse_cache, encode_sparse_response, hash_filter, verify_sparse,
109};
110
111pub use hash::{HASH_LEN, HEX_LEN, Hash, Hasher, to_hex, to_hex_bytes};
112pub use object::{
113 Blob, ChunkedBlob, Commit, Delta, EntryMode, IDENTITY_MAX_LEN, Identity, IdentityKind, MAGIC,
114 MkitError, Object, ObjectType, Remix, RemixSource, SCHEMA_VERSION, TAG_NAME_MAX_LEN, Tag, Tree,
115 TreeEntry,
116};
117pub use serialize::{deserialize, serialize};
118pub use sign::{
119 COMMIT_DOMAIN, KeyPair, PublicKey, REMIX_DOMAIN, SecretSeed, Signature, TAG_DOMAIN,
120 commit_signing_bytes, commit_signing_hash, remix_signing_bytes, remix_signing_hash,
121 sign_commit, sign_remix, sign_tag, tag_signing_bytes, tag_signing_hash, verify, verify_commit,
122 verify_object_signature, verify_remix, verify_tag,
123};
124pub use store::{
125 MAX_RAW_OBJECT_SIZE, MAX_TREE_DEPTH, MKIT_DIR, OBJECTS_DIR, ObjectStore, StoreError,
126 StoreResult,
127};
128
129pub use chunker::{
131 AVG_SIZE as CHUNK_AVG_SIZE, ChunkBoundary, ChunkIterator, FastCdc, MASK_L as CHUNK_MASK_L,
132 MASK_S as CHUNK_MASK_S, MAX_SIZE as CHUNK_MAX_SIZE, MIN_SIZE as CHUNK_MIN_SIZE,
133 SEED as CHUNK_SEED, chunk_boundaries, gear_table_digest,
134};
135
136pub use delta::{
138 DeltaCorruption, HEADER_LEN as DELTA_HEADER_LEN, MAX_INSERT_LEN, OP_COPY, STREAM_VERSION,
139};
140
141pub use pack::{
143 DecodeLimits, DecodeReport, DecodedEntry, DeltaBaseSource, HEADER_LEN as PACK_HEADER_LEN,
144 MAGIC as PACK_MAGIC, MAX_ENTRIES as PACK_MAX_ENTRIES,
145 MAX_TOTAL_PAYLOAD as PACK_MAX_TOTAL_PAYLOAD, NoExternalBases, PackEntries, PackEntry,
146 PackError, PackReader, PackWriter, TRAILER_LEN as PACK_TRAILER_LEN, UnpackReport,
147 VERSION as PACK_VERSION, decode_entries_with, pack_key,
148};
149
150pub use ignore::{IgnoreError, IgnoreList, MAX_IGNORE_FILE_BYTES, Pattern, glob_match};
152pub use index::{
153 EntryStatus, INDEX_FILE, Index, IndexEntry, IndexError, IndexResult, MAGIC as INDEX_MAGIC,
154 MAX_INDEX_BYTES, MAX_PATH_LEN, validate_index_path,
155};
156pub use layout::RepoLayout;
157pub use refs::{
158 BRANCH_REF_PREFIX, HEAD_FILE, HEADS_DIR, Head, MAX_BRANCH_NAME_BYTES, MAX_REF_NAME_BYTES,
159 MAX_TAG_NAME_BYTES, PACKMAP_REF_PREFIX, REFS_DIR, Ref, RefError, RefNameKind, RefResult,
160 RefWriteCondition, SHALLOW_FILE, TAG_REF_PREFIX, TAGS_DIR, check_new_name, check_new_ref_name,
161 check_pushable_branch, decode_ref_wire, encode_ref_wire, validate_ref_name,
162 validate_ref_name_grammar, validate_ref_prefix,
163};
164pub use repo_lock::{DEFAULT_TIMEOUT as LOCK_DEFAULT_TIMEOUT, LockError, LockResult, RepoLock};
165pub use worktree::{
166 CHUNK_THRESHOLD, LoadedBlob, MAX_FILE_BYTES, WorktreeError, WorktreeResult, read_blob,
167 store_file_object, validate_symlink_target,
168};
169
170pub use protocol::{
174 AdvanceOutcome, BACKOFF_CAP, BACKOFF_INITIAL, BACKOFF_MAX_ATTEMPTS, BackoffIterator,
175 CommitOutcome, PackKey, Transport, TransportError, TransportResult, UploadLimits, is_retryable,
176 pack_key_from_hex,
177};
178
179pub use ops::{
185 CherryPickError, CherryPickResult, ClosureMode, Conflict, ConflictKind, DiffEntry, DiffError,
186 DiffKind, DiffResult, MergeResult, StatusEntry, StatusStaging, cherry_pick, children,
187 collect_ancestor_set, diff_trees, find_merge_base, is_ancestor, merge_trees, reachable_closure,
188 reachable_objects, reachable_snapshot, status_diff,
189};