Expand description
Gust library — core Git-compatible engine.
§Architecture
All Git-compatible logic lives here; the grit binary is a thin CLI shim
that parses arguments and delegates to types exposed from this crate.
§Modules
error— shared error types usingthiserrorobjects— object ID, object kinds, and in-memory representationsodb— loose object store (read/write zlib-compressed objects)repo— repository discovery and handleindex— Git index (staging area) read/writeignore— ignore/exclude pattern matching for check-ignorerefs— reference storage (files backend)
Modules§
- attributes
- Gitattributes parsing and pattern matching for
check-attrand validation. - check_
ref_ format - Ref-name validation —
git check-ref-formatrules. - config
- Git-compatible configuration file parser and accessor.
- crlf
- CRLF / EOL conversion and clean/smudge filter support.
- delta_
encode - Encode Git pack binary deltas (format decoded by
crate::unpack_objects::apply_delta). - diff
- Diff machinery — compare trees, index entries, and working tree files.
- error
- Shared error types for the Gust library.
- fmt_
merge_ msg - Merge commit message formatter —
git fmt-merge-msglogic. - git_
date - Git-compatible date parsing and display (ported from Git
date.c). - hooks
- Hook execution utilities.
- ignore
- Ignore and exclude matching for
check-ignore. - index
- Git index (staging area) reading and writing.
- ls_
remote ls-remote— enumerate references from a local repository.- merge_
base - Merge-base and reachability primitives.
- merge_
file - Three-way file merge — the engine behind
grit merge-file. - midx
- Multi-pack-index (MIDX) file writing.
- name_
rev - Name-rev: name commits relative to refs.
- objects
- Git object model: object IDs, kinds, and in-memory representations.
- odb
- Loose object database: reading and writing zlib-compressed Git objects.
- pack
- Pack and pack-index helpers for object counting and verification.
- parse_
options_ test_ tool - Git-compatible
parse-optionssurface used bytest-tool parse-optionsand related helpers (parse-options-flags,parse-subcommand). Matchesgit/t/helper/test-parse-options.c. - patch_
ids - Patch-ID computation for commit equivalence detection.
- prune_
packed - Library implementation of
prune-packed. - reflog
- Reflog reading and management.
- refs
- Reference storage — files backend + reftable backend.
- reftable
- Reftable format — binary reference storage.
- repo
- Repository discovery and the primary
Repositoryhandle. - rev_
list - Commit traversal and output planning for
rev-list. - rev_
parse - Revision parsing and repository discovery helpers for
rev-parse. - state
- Repository state machine — HEAD resolution, branch status, and in-progress operation detection.
- stripspace
- Core logic for
git stripspace. - tree_
path_ follow - Resolve tree paths with symlink following (
get_tree_entry_follow_symlinks). - unix_
process - Unix-only process helpers (FFI).
- unpack_
objects unpack-objects: unpack a pack stream into loose objects.- userdiff
- User-defined and built-in diff function-name matching.
- wildmatch
- write_
tree - Build tree objects from index entries (
git write-treecore logic).