Skip to main content

grit_lib/
lib.rs

1//! Gust library — core Git-compatible engine.
2//!
3//! # Architecture
4//!
5//! All Git-compatible logic lives here; the `grit` binary is a thin CLI shim
6//! that parses arguments and delegates to types exposed from this crate.
7//!
8//! ## Modules
9//!
10//! - [`error`] — shared error types using `thiserror`
11//! - [`objects`] — object ID, object kinds, and in-memory representations
12//! - [`odb`] — loose object store (read/write zlib-compressed objects)
13//! - [`repo`] — repository discovery and handle
14//! - [`index`] — Git index (staging area) read/write
15//! - [`ignore`] — ignore/exclude pattern matching for check-ignore
16//! - [`refs`] — reference storage (files backend)
17
18pub mod attributes;
19pub mod check_ref_format;
20pub mod commit_encoding;
21pub mod commit_pretty;
22pub mod commit_trailers;
23pub mod config;
24pub mod connectivity;
25pub mod crlf;
26pub mod delta_encode;
27pub mod diff;
28pub mod diffstat;
29pub mod error;
30pub mod fast_export;
31pub mod fast_import;
32pub mod fetch_negotiator;
33pub mod filter_process;
34pub mod fmt_merge_msg;
35pub mod fsck_standalone;
36pub mod git_date;
37pub mod gitmodules;
38pub mod hooks;
39pub mod ident;
40pub mod ignore;
41pub mod index;
42pub mod index_name_hash_lazy;
43pub mod interpret_trailers;
44pub mod line_log;
45pub mod ls_remote;
46pub mod mailmap;
47pub mod merge_base;
48pub mod merge_diff;
49pub mod merge_file;
50pub mod merge_trees;
51pub mod mergetool_vimdiff;
52pub mod midx;
53pub mod name_rev;
54pub mod objects;
55pub mod odb;
56pub mod pack;
57pub mod pack_geometry;
58pub mod pack_name_hash;
59pub mod parse_options_test_tool;
60pub mod patch_ids;
61pub mod pathspec;
62pub mod promisor;
63pub mod prune_packed;
64pub mod quote_path;
65pub mod reflog;
66pub mod refs;
67pub mod reftable;
68pub mod repo;
69pub mod rerere;
70pub mod rev_list;
71pub mod rev_parse;
72#[cfg(unix)]
73pub mod simple_ipc;
74pub mod sparse_checkout;
75#[cfg(not(unix))]
76pub mod simple_ipc {
77    /// Whether simple IPC is supported on this platform.
78    #[must_use]
79    pub fn supports_simple_ipc() -> bool {
80        false
81    }
82
83    /// Stub for non-Unix targets.
84    pub fn run_simple_ipc_tool(_args: &[String]) -> i32 {
85        eprintln!("simple IPC not available on this platform");
86        1
87    }
88}
89pub mod state;
90pub mod stripspace;
91pub mod submodule_gitdir;
92pub mod textconv_cache;
93pub mod tree_path_follow;
94#[cfg(unix)]
95pub mod unix_process;
96pub mod unpack_objects;
97pub mod userdiff;
98pub mod whitespace_rule;
99pub mod wildmatch;
100pub mod write_tree;
101pub mod ws;