This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / knot2 / crates / knot-git / src / lib.rs
2.0 kB 57 lines
1mod archive; 2mod bitmap; 3mod error; 4#[cfg(feature = "instrument")] 5pub mod instrument; 6mod maintenance; 7mod objects; 8mod patch; 9mod patch_apply; 10mod patch_parse; 11mod reads; 12mod repo; 13mod staging; 14 15pub use archive::{ArchiveFormat, ArchiveLimit, ArchivePrefix}; 16pub use bitmap::{reachable_via_bitmap, verbatim_clone_pack, write_bitmap, write_midx_bitmap}; 17pub use error::{GitError, SelectionLimit}; 18pub use maintenance::{PackRefsReport, ReflogReport}; 19pub use objects::{ 20 BlobReader, Commit, CommitChangeId, CommitDepth, CommitRange, Comparison, Deepen, EntryKind, 21 FileChange, Filter, Haves, Identity, MAX_TREE_DEPTH, PackBudget, PackSelection, ShallowCommits, 22 ShallowPlan, Tree, TreeDepth, TreeEntry, Wants, 23}; 24pub use patch::{ 25 FilePatch, Hunk, HunkLine, LineCount, LineNumber, LineOp, MAX_DIFF_BLOB_BYTES, PatchRange, 26 PatchStatus, 27}; 28pub use patch_apply::{ 29 ApplyError, ApplyOutcome, Conflict, ConflictReason, NewCommit, PatchApplier, StagedAction, 30 StagedChange, 31}; 32pub use patch_parse::{ 33 FileIntent, MailPatch, ParsedFile, PatchParseError, PatchPayload, is_format_patch, 34 parse_mailbox, parse_mailbox_bounded, parse_patch, parse_patch_bounded, 35}; 36pub use reads::{ 37 AnnotatedTag, BranchInfo, BranchTip, LastCommit, LogLimit, LogSkip, PathEntry, SizedEntry, 38 Submodule, TagInfo, 39}; 40pub use repo::{ 41 AdvertScope, HeadRef, Layout, PackHash, PackfileUri, PackfileUrl, RefRecord, RefTxn, RefUpdate, 42 ReflogUpdate, Repo, is_branch, is_public_ref, is_reserved, knot_shard, repo_shard, 43 screens_reserved, 44}; 45pub use staging::{INCOMING_PREFIX, Staging}; 46 47#[doc(hidden)] 48pub mod fuzz { 49 pub fn patch(data: &[u8]) { 50 let text = String::from_utf8_lossy(data); 51 let _ = crate::is_format_patch(&text); 52 let _ = crate::parse_patch(&text); 53 let _ = crate::parse_mailbox(&text); 54 let mid = data.len() / 2; 55 let _ = crate::patch_apply::apply_delta(&data[..mid], &data[mid..]); 56 } 57}