Skip to main content

grit_lib/revwalk/
mod.rs

1//! Revision walking: rev-parse, rev-list, merge-base, and commit-graph acceleration.
2//!
3//! Library guide: [mod](https://grit-scm.com/docs/library/revwalk)
4//!
5//! ```rust
6//! use grit_lib::repo::{InitOptions, Repository};
7//! # fn main() -> grit_lib::error::Result<()> {
8//! let dir = tempfile::tempdir()?;
9//! let _repo = Repository::init(dir.path(), &InitOptions::default())?;
10//! let _ = _repo.rev_walk();
11//!
12//! # Ok(())
13//! # }
14//! ```
15pub mod filter;
16pub mod graph;
17pub mod group_by;
18pub mod handle;
19pub mod queries;
20
21pub use crate::diff::{Pickaxe, PickaxeError, PickaxeKind};
22pub use filter::{CommitFilter, CommitFilterBuilder, CommitFilterError, Pattern};
23pub use graph::{
24    display_parents_for_graph, list_commits_for_log_graph, log_graph_materialize,
25    rewrite_display_parents, rewrite_display_parents_map, GraphCharset, GraphCommitInput,
26    GraphLayout, GraphLineKind, GraphRenderedLine, GraphRowTopology,
27};
28pub use group_by::{
29    group_commits_by_author, group_commits_by_author_from_rev, mailmap_for_grouping, AuthorGroup,
30    GroupByAuthorOptions,
31};
32pub use handle::RevWalk;
33pub use queries::{
34    committer_cutoff_from_date, parse_rev_walk_tokens, resolve_log_walk_tips_and_hide,
35    rev_list_commits_for_author_group, LeftRightCounts, MergeFilter, RefSelection,
36    RevWalkListOptions, RevWalkParsedSpecs,
37};
38
39pub mod rev_list {
40    //! rev_list API (re-exported at this path).
41    pub use crate::rev_list::*;
42}
43pub mod rev_parse {
44    //! rev_parse API (re-exported at this path).
45    pub use crate::rev_parse::*;
46}
47pub mod merge_base {
48    //! merge_base API (re-exported at this path).
49    pub use crate::merge_base::*;
50}
51pub mod log_walk {
52    //! Log-order revision walking helpers re-exported at this path.
53    pub use crate::log_walk::*;
54}
55pub mod commit_graph {
56    //! Commit-graph read and write helpers.
57    pub use crate::commit_graph_file::*;
58    pub use crate::commit_graph_write::*;
59}
60pub mod rev_list_error {
61    //! rev_list_error API (re-exported at this path).
62    pub use crate::rev_list_error::*;
63}
64pub mod rev_parse_error {
65    //! rev_parse_error API (re-exported at this path).
66    pub use crate::rev_parse_error::*;
67}
68pub mod object_inspect {
69    //! Typed revision resolution and object display payloads.
70    pub use crate::object_inspect_root::*;
71}
72pub mod history {
73    //! In-memory history rewrite planning and apply.
74    pub use crate::history_root::*;
75}