hindsight_git/lib.rs
1// Copyright (c) 2026 - present Nicholas D. Crosbie
2// SPDX-License-Identifier: MIT
3
4//! hindsight-git: Git log processing for hindsight-mcp
5//!
6//! This library crate provides functionality to parse and process git logs
7//! for consumption by the hindsight-mcp server.
8
9#![warn(missing_docs)]
10
11//! # Example
12//!
13//! ```no_run
14//! use hindsight_git::{GitRepo, WalkOptions};
15//!
16//! let repo = GitRepo::open(".").expect("open repo");
17//! let commits = repo.walk_commits(&WalkOptions::latest(10).with_diff())
18//! .expect("walk commits");
19//!
20//! for c in commits {
21//! println!("{} - {}", c.commit.short_sha(), c.commit.subject());
22//! }
23//! ```
24
25pub mod commit;
26pub mod error;
27pub mod parser;
28
29pub use commit::Commit;
30pub use error::GitError;
31pub use parser::{CommitWithDiff, DiffSummary, FileDiff, GitRepo, WalkOptions};
32
33/// Re-export commonly used types
34pub mod prelude {
35 pub use crate::commit::Commit;
36 pub use crate::error::GitError;
37 pub use crate::parser::{CommitWithDiff, DiffSummary, GitRepo, WalkOptions};
38}