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 handle::RevWalkCommitIter;
34pub use queries::{
35    committer_cutoff_from_date, parse_rev_walk_tokens, resolve_log_walk_tips_and_hide,
36    rev_list_commits_for_author_group, LeftRightCounts, MergeFilter, RefSelection,
37    RevWalkCommitIterOptions, RevWalkListOptions, RevWalkParsedSpecs,
38};
39
40pub mod rev_list {
41    //! rev_list API (re-exported at this path).
42    pub use crate::rev_list::*;
43}
44pub mod rev_parse {
45    //! rev_parse API (re-exported at this path).
46    pub use crate::rev_parse::*;
47}
48pub mod merge_base {
49    //! merge_base API (re-exported at this path).
50    pub use crate::merge_base::*;
51}
52pub mod log_walk {
53    //! Log-order revision walking helpers re-exported at this path.
54    pub use crate::log_walk::*;
55}
56pub mod commit_graph {
57    //! Commit-graph read and write helpers.
58    pub use crate::commit_graph_file::*;
59    pub use crate::commit_graph_write::*;
60}
61pub mod rev_list_error {
62    //! rev_list_error API (re-exported at this path).
63    pub use crate::rev_list_error::*;
64}
65pub mod rev_parse_error {
66    //! rev_parse_error API (re-exported at this path).
67    pub use crate::rev_parse_error::*;
68}
69pub mod object_inspect {
70    //! Typed revision resolution and object display payloads.
71    pub use crate::object_inspect_root::*;
72}
73pub mod history {
74    //! In-memory history rewrite planning and apply.
75    pub use crate::history_root::*;
76}