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 describe;
16pub mod filter;
17pub mod graph;
18pub mod group_by;
19pub mod handle;
20pub mod queries;
21
22pub use crate::diff::{Pickaxe, PickaxeError, PickaxeKind};
23pub use crate::rev_list::CommitExtent;
24pub use describe::{DescribeOptions, DescribedCommit};
25pub use filter::{CommitFilter, CommitFilterBuilder, CommitFilterError, Pattern};
26pub use graph::{
27    display_parents_for_graph, list_commits_for_log_graph, log_graph_materialize,
28    rewrite_display_parents, rewrite_display_parents_map, GraphCharset, GraphCommitInput,
29    GraphLayout, GraphLineKind, GraphRenderedLine, GraphRowTopology,
30};
31pub use group_by::{
32    group_commits_by_author, group_commits_by_author_from_rev, mailmap_for_grouping, AuthorGroup,
33    GroupByAuthorOptions,
34};
35pub use handle::RevWalk;
36pub use handle::RevWalkCommitIter;
37pub use queries::{
38    committer_cutoff_from_date, parse_rev_walk_tokens, resolve_log_walk_tips_and_hide,
39    rev_list_commits_for_author_group, rev_walk_list_supports_stream, LeftRightCounts, MergeFilter,
40    RefSelection, RevWalkCommitIterOptions, RevWalkCommitStream, RevWalkCommitStreamItem,
41    RevWalkListOptions, RevWalkParsedSpecs,
42};
43
44pub mod rev_list {
45    //! rev_list API (re-exported at this path).
46    pub use crate::rev_list::*;
47}
48pub mod rev_parse {
49    //! rev_parse API (re-exported at this path).
50    pub use crate::rev_parse::*;
51}
52pub mod merge_base {
53    //! merge_base API (re-exported at this path).
54    pub use crate::merge_base::*;
55}
56pub mod log_walk {
57    //! Log-order revision walking helpers re-exported at this path.
58    pub use crate::log_walk::*;
59}
60pub mod commit_graph {
61    //! Commit-graph read and write helpers.
62    pub use crate::commit_graph_file::*;
63    pub use crate::commit_graph_write::*;
64}
65pub mod rev_list_error {
66    //! rev_list_error API (re-exported at this path).
67    pub use crate::rev_list_error::*;
68}
69pub mod rev_parse_error {
70    //! rev_parse_error API (re-exported at this path).
71    pub use crate::rev_parse_error::*;
72}
73pub mod object_inspect {
74    //! Typed revision resolution and object display payloads.
75    pub use crate::object_inspect_root::*;
76}
77pub mod history {
78    //! In-memory history rewrite planning and apply.
79    pub use crate::history_root::*;
80}