diff --git a/git-repository/src/revision/mod.rs b/git-repository/src/revision/mod.rs index f74ba8e853..a35597dd18 100644 --- a/git-repository/src/revision/mod.rs +++ b/git-repository/src/revision/mod.rs @@ -12,6 +12,7 @@ pub use walk::iter::Walk; pub mod spec; /// The specification of a revision as parsed from a revision specification like `HEAD@{1}` or `v1.2.3...main`. +/// It's typically created by [`repo.rev_parse()`][crate::Repository::rev_parse()]. /// /// See the [official git documentation](https://git-scm.com/docs/git-rev-parse#_specifying_revisions) for reference on how /// to specify revisions and revision ranges. diff --git a/git-repository/src/revision/spec/parse/mod.rs b/git-repository/src/revision/spec/parse/mod.rs index 0510c5397b..129c7af391 100644 --- a/git-repository/src/revision/spec/parse/mod.rs +++ b/git-repository/src/revision/spec/parse/mod.rs @@ -13,6 +13,8 @@ pub mod error; impl<'repo> Spec<'repo> { /// Parse `spec` and use information from `repo` to resolve it, using `opts` to learn how to deal with ambiguity. + /// + /// Note that it's easier and to use [`repo.rev_parse()`][Repository::rev_parse()] instead. pub fn from_bstr<'a>(spec: impl Into<&'a BStr>, repo: &'repo Repository, opts: Options) -> Result { let mut delegate = Delegate::new(repo, opts); match git_revision::spec::parse(spec.into(), &mut delegate) { diff --git a/git-repository/src/revision/walk.rs b/git-repository/src/revision/walk.rs index a0f7e641fb..14061d9337 100644 --- a/git-repository/src/revision/walk.rs +++ b/git-repository/src/revision/walk.rs @@ -3,7 +3,8 @@ use git_odb::FindExt; use crate::{revision, Repository}; -/// A platform to traverse the revision graph by adding starting points as well as points which shouldn't be crossed. +/// A platform to traverse the revision graph by adding starting points as well as points which shouldn't be crossed, +/// returned by [`Repository::rev_walk()`]. pub struct Platform<'repo> { pub(crate) repo: &'repo Repository, pub(crate) tips: Vec,