pub struct Tracer { /* private fields */ }Expand description
The reader. Opened from anywhere inside the repository; every question is answered by running git again, because the history changes outside this process.
Implementations§
Source§impl Tracer
impl Tracer
Sourcepub fn open(start: &Path) -> Result<Self>
pub fn open(start: &Path) -> Result<Self>
Open the tracer for the repository holding start. Git runs in the work tree the
caller named: every ref and every commit of the repository is visible from any of
them, so the answer does not depend on which one it is, while reading the project
model from somewhere else would answer about a plan this checkout does not have.
The trunk is the repository’s, discovered the way the topology discovers it.
Sourcepub fn with_issues(self, issues: Vec<String>) -> Self
pub fn with_issues(self, issues: Vec<String>) -> Self
The issue ids to look for in branch names, from a caller that has already read the project model — the index, which parsed every issue record, rather than a second directory listing that could disagree with it.
Sourcepub fn trunk(&self) -> Option<&str>
pub fn trunk(&self) -> Option<&str>
The trunk every measurement is against, when one was discovered.
Sourcepub fn traces(&self) -> Result<Vec<IssueTrace>>
pub fn traces(&self) -> Result<Vec<IssueTrace>>
Every issue at least one ref names, in id order, each with its branches and commits.
Sourcepub fn trace(&self, issue: &str) -> Result<IssueTrace>
pub fn trace(&self, issue: &str) -> Result<IssueTrace>
One issue: its branches and their commits. An id no ref names is a trace with no branches, not an error — an issue nobody has started yet is a legitimate answer.
Sourcepub fn commit(&self, rev: &str) -> Result<Option<CommitRef>>
pub fn commit(&self, rev: &str) -> Result<Option<CommitRef>>
Resolve a revision to the commit it names, with the fields a report shows. None
when nothing in this repository answers to it.
Sourcepub fn trunk_commits(&self, limit: usize) -> Result<Vec<CommitRef>>
pub fn trunk_commits(&self, limit: usize) -> Result<Vec<CommitRef>>
The newest limit commits of the trunk, merges excluded: the work a report
attributes. Merge commits are integration events rather than work, and each is
already named as the merge_commit of the branch it brought in.
Sourcepub fn report(&self, limit: usize) -> Result<TraceReport>
pub fn report(&self, limit: usize) -> Result<TraceReport>
The whole answer: every issue with a branch, every issue without one, and the newest
limit trunk commits each attributed to the issue whose branches contain it or
reported as having none.